netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Beverley <andy@andybev.com>
To: Ed W <lists@wildgooses.com>
Cc: Netfilter <netfilter@vger.kernel.org>
Subject: Re: High accuracy bandwidth accounting?
Date: Sat, 14 May 2011 17:29:03 +0100	[thread overview]
Message-ID: <1305390543.1921.705.camel@andybev-desktop> (raw)
In-Reply-To: <4DCE8540.4060909@wildgooses.com>

On Sat, 2011-05-14 at 14:36 +0100, Ed W wrote:
> >>
> >> So tcpdump gives me (note sizes are payload, add 28 to compare with conntrack):
> >>
> >> 22:23:41.014217 IP 10.141.36.76 > 8.8.8.8: ICMP 10.141.36.76 udp port 25630 unreachable, length 214
> >>
> >>
> > 
> > Have you tried investigating whether the ICMP packets in question are
> > making it into any of the conntrack system? Maybe by using the userspace
> > program, or my using the conntrack match extension in iptables?
> 
> I think that these UDP packets are completely missing the entire
> conntrack system?
> 

Okay, I've played around with this myself using a similar scenario. It
looks to me like the packets *are* making it into the conntrack system.

I tried setting a LOG target to match those packets with a ctstate of
RELATED:

iptables -A INPUT -p ICMP -m conntrack --ctstate RELATED -j LOG

And they were indeed logged. But there was no visibility of them using
the conntrack userspace program. This says to me that conntrack does
know about them, but it doesn't do anything with them, as the packets
are basically saying "no thanks" to a connection request.

I guess you could argue that the packet counters should be updated
regardless, although bear in mind that the ICMP packets are related to
the original UDP connection, so any update should happen to that
connection. You wouldn't see them as a separate connection.

> 
> I am using ulogd2 to dump all the connections and the ones above are all
> that I see.  Therefore either there is a bug in ulogd2 which isn't
> spitting out this connection or conntrack completely misses this packet?
> (arguably whether should it be applied to this connection or not mind?)

Your last comment there is the key. The ICMP packets are coming in,
RELATED to the UDP connection, but are not being applied to it, arguably
because of what they are saying.

> 
> I think you are leaning towards confirming this is unexpected and could
> be reported as a "bug"?

I wouldn't like to say whether it is a bug really...

>   I wrote up the above on the -devel list but
> didn't attract any comments so far

It might be worth trying again with a different question, along the
lines of "can conntrack be changed to count ICMP unreachable packets
related to an existing connection". If you're feeling brave, you could
have a poke around in the source code.

Andy



  reply	other threads:[~2011-05-14 16:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 14:12 High accuracy bandwidth accounting? Ed W
2011-05-09 21:45 ` Andrew Beverley
2011-05-09 22:07   ` Ed W
2011-05-09 22:16     ` Andrew Beverley
2011-05-09 22:49   ` Ed W
2011-05-11 14:30   ` Ed W
2011-05-12  0:01     ` Andrew Beverley
2011-05-12 22:17       ` Ed W
2011-05-12 22:27         ` Andrew Beverley
2011-05-09 23:23 ` Ed W
2011-05-14  9:23   ` Andrew Beverley
2011-05-14 13:36     ` Ed W
2011-05-14 16:29       ` Andrew Beverley [this message]
2011-05-14 22:33         ` Jan Engelhardt
2011-05-15  7:23           ` Andrew Beverley
2011-05-15  9:08             ` Jan Engelhardt
2011-05-16  6:43               ` Andrew Beverley
2011-05-16  7:23                 ` Jan Engelhardt
2011-05-22 21:22                   ` Andrew Beverley
2011-05-16 14:35               ` Ed W
2011-05-16 14:59                 ` Jan Engelhardt
2011-05-16 16:53                   ` Ed W
2011-05-14  9:48   ` Marek Kierdelewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305390543.1921.705.camel@andybev-desktop \
    --to=andy@andybev.com \
    --cc=lists@wildgooses.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).