Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Emilio Lazo Zaia <emiliolazozaia@gmail.com>
To: netfilter@vger.kernel.org
Subject: iptables-save does not save correcly rateest bps parameter
Date: Wed, 20 Apr 2011 14:02:28 -0430	[thread overview]
Message-ID: <1303324348.26585.5.camel@uqbar.local> (raw)

I have found something that may be a bug in iptables-save or in kernel
'rateest' code.

# iptables -t mangle -A Balance -m conntrack --ctstate NEW -m rateest
--rateest1 wan1meter --rateest-bps 1000kbit --rateest-bps1 1000kbit
--rateest-gt --rateest2 wan2meter --rateest-delta -j CONNMARK --set-mark
1

its corresponding line in iptables -L is:

CONNMARK   all  --  anywhere             anywhere            ctstate NEW
rateest match wan1meter delta bps 1000Kbit gt wan2meter delta bps
1000Kbit         CONNMARK set 0x1

so it seems to be right, but this line in iptables-save is:

-A Balance -m conntrack --ctstate NEW -m rateest --rateest1 wan1meter
--rateest-bps --rateest-gt --rateest2 wan2meter -j CONNMARK --set-xmark
0x1/0xffffffff

There is neither bps value nor delta parameter, so after
iptables-restore with the generated file, this iptables rule becames:

CONNMARK   all  --  anywhere             anywhere            ctstate NEW
rateest match wan1meter bps gt wan2meter bps CONNMARK set 0x1

I guess the bug is in iptables-save and not in the kernel but really I
don't know if the kernel honours these parameters.

(iptables version 1.4.10, Debian kernel 2.6.38-2-amd64)


             reply	other threads:[~2011-04-20 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 18:32 Emilio Lazo Zaia [this message]
2011-05-18 21:10 ` iptables-save does not save correcly rateest bps parameter Jan Engelhardt

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=1303324348.26585.5.camel@uqbar.local \
    --to=emiliolazozaia@gmail.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