All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Fisher <brad@info-link.net>
To: Borja Pacheco <bpacheco@acisa.es>
Cc: Netfilter-Devel <netfilter-devel@lists.netfilter.org>
Subject: Re: issue with the quota match
Date: Tue, 29 Mar 2005 09:53:32 -0600	[thread overview]
Message-ID: <424979FC.8020005@info-link.net> (raw)
In-Reply-To: <42491710.4090400@eurodev.net>

Pablo Neira wrote:

> Borja Pacheco wrote:
>
>> In a first moment I insert a rule with an initial quota of 1000 bytes...
>>     0     0 ACCEPT     all  --  *      *       0.0.0.0/0
>> 0.0.0.0/0           quota: 1000 bytes
>>
>> Next, I generate packets and here it's the amazing result....
>>     8   448 ACCEPT     all  --  *      *       0.0.0.0/0
>> 0.0.0.0/0           quota: 712 bytes
>>
>> Theoretically, 1000 assigned bytes minus total traffic generated (448
>> bytes), must originate the remaining quota the rule has: 552. BUT IT 
>> SAYS 712 BYTES!!!!!
>
>
> quota doesn't count the ip headers (20 bytes). Some maths:
>
> 8 packets x 20 bytes = 160 bytes
> 552 + 160 = 712 bytes
>
> -- 
> Pablo
>
>
> !DSPAM:42491732223341143723889!
>
I had submitted a patch at one time that added an option to the quota 
match to tell it to count the headers...  If anyone's interested I could 
post it again (or you could try searching the list archive), but it is 
probably a little dated at the moment since I haven't done any work on 
it in quite a while...

-Brad

  reply	other threads:[~2005-03-29 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28 17:14 issue with the quota match Borja Pacheco
2005-03-29  8:51 ` Pablo Neira
2005-03-29 15:53   ` Brad Fisher [this message]
2005-04-03 18:20     ` Patrick McHardy

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=424979FC.8020005@info-link.net \
    --to=brad@info-link.net \
    --cc=bpacheco@acisa.es \
    --cc=netfilter-devel@lists.netfilter.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 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.