All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan Duff <bduff@astrocorp.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: James King <t.james.king@gmail.com>, netfilter-devel@vger.kernel.org
Subject: Re: xt_statistic.c - the statistic match
Date: Thu, 15 Jan 2009 09:46:36 -0600	[thread overview]
Message-ID: <496F5A5C.1070504@astrocorp.com> (raw)
In-Reply-To: <alpine.LSU.2.00.0901151143480.400@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> On Thursday 2009-01-15 11:37, James King wrote:
>   
>>>>> //snip - iptables -L
>>>>> 978189 1210792980 ACCEPT     all  --  ethX   *       10.10.10.0/24
>>>>> 10.10.11.0/24    MARK match 0x1
>>>>> 2182885 2704995300 ACCEPT     all  --  ethX   *       10.10.10.0/24
>>>>> 10.10.11.0/24    MARK match 0x2
>>>>> 2289382 2862482240 ACCEPT     all  --  ethX   *       10.10.10.0/24
>>>>> 10.10.11.0/24    MARK match 0x3
>>>>> 1417708 1807169776 MARK       all  --  ethX   *       10.10.10.0/24
>>>>>  10.10.11.0/24    MARK set 0x1
>>>>> 1417708 1807169776 ACCEPT     all  --  ethX   *       10.10.10.0/24
>>>>>  10.10.11.0/24    MARK match 0x1
>>>>>           
>>> //end snip
>>>       
>> I'm a bit curious about this.  I thought it was only possible to use
>> the MARK target in mangle, but you seem to be listing the filter
>> table.  I notice that mark_tg_reg[] revision 2 doesn't limit the table
>> to mangle like r0 and r1 do (anyone know if this a bug, or is r2
>> intended to be available everywhere?)
>>     
>
> Just posted moments ago:
> http://marc.info/?l=netfilter-devel&m=123200677329507&w=2
>
>   
>> If you're using iptables to commit these rules individually (as your
>> first message implies) and the system is under traffic already, it's
>> easy for them to get out of sync because each nth rule tracks its own
>> state individually and MARK is non-terminating.
>>     
>
> And iptables -Z should take care of the counters if rules are added
> one-by-one. Also noteworthy is that when iptables is run, the
> ruleset (including counters) is downloaded from the kernel, and
> later uploaded again - possible setting counters backwards.
> (I do no think there are any workarounds to that in the kernel,
> at least I have not seen any.)
> But at least all of the counters are set to where they were.
>   
Would iptables -Z fix the internal counter for the statistic nth match 
rule?  I don't see that it would.  Because that's the counter I really 
care about fixing.

A couple things - this problem occurs multiple times after adding the 
rules (as in it can correct itself by oops'ing again), the other amusing 
thing - if I use printk's I can make it happen faster, also if I'm doing 
more throughput it happens faster.

-Bryan

  reply	other threads:[~2009-01-15 15:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 22:20 xt_statistic.c - the statistic match Bryan Duff
2009-01-10  3:38 ` Jan Engelhardt
2009-01-12 17:35   ` Bryan Duff
2009-01-13  4:43     ` Patrick McHardy
2009-01-13  7:28       ` Jan Engelhardt
2009-01-13  7:32         ` Jan Engelhardt
2009-01-15 10:37     ` James King
2009-01-15 10:45       ` Jan Engelhardt
2009-01-15 15:46         ` Bryan Duff [this message]
2009-01-15 15:56           ` Jan Engelhardt
2009-01-15 16:25             ` Bryan Duff
2009-01-15 15:34       ` Bryan Duff

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=496F5A5C.1070504@astrocorp.com \
    --to=bduff@astrocorp.com \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=t.james.king@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.