From: Patrick McHardy <kaber@trash.net>
To: Abhijit Menon-Sen <ams@toroid.org>
Cc: netdev@vger.kernel.org, shemminger@osdl.org
Subject: Re: tc filter add ... fw ... action drop
Date: Wed, 18 Jul 2007 11:49:55 +0200 [thread overview]
Message-ID: <469DE243.20903@trash.net> (raw)
In-Reply-To: <20070718032841.GA14874@toroid.org>
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
Abhijit Menon-Sen wrote:
> Hi.
>
> Is it a bug that:
>
> # tc filter add dev eth0 parent 1: protocol ip prio 0 handle 0xfffffff
> fw police rate 1 burst 1 mpu 0 mtu 1 action drop
> ^^^^^^^^^^^
> creates a filter that looks like:
>
> # tc filter ls dev eth0
> filter parent 1: protocol ip pref 49152 fw
> filter parent 1: protocol ip pref 49152 fw handle 0xfffffff police 0x1
> rate 0bit burst 0b mtu 1b action reclassify
> ^^^^^^^^^^^^^^^^^
> ref -543190236 bind 4
>
> (which reclassifies and thus lets 0xfffffff-marked packets through).
>
> I'm pretty sure this used to work under 2.4.x (though I no longer have a
> 2.4 box to test with), but it hasn't worked on any of the 2.6.x kernels
> I've tried (with both iproute2-ss060323 and 070710).
Good catch. It seems this is merely a parsing error, iproute doesn't
have an "action" parameter and aborts parsing, so it uses the default
value of "RECLASSIFY". It never had this parameter, so this patch
removes it from the help text and makes it return an error.
BTW, Stephen, whats the status of all the patches I sent you?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1060 bytes --]
diff --git a/tc/m_police.c b/tc/m_police.c
index 36a7719..62e37f9 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -37,7 +37,7 @@ static void usage(void)
fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
fprintf(stderr, " [ peakrate BPS ] [ avrate BPS ]\n");
fprintf(stderr, " [ ACTIONTERM ]\n");
- fprintf(stderr, "Old Syntax ACTIONTERM := action <EXCEEDACT>[/NOTEXCEEDACT] \n");
+ fprintf(stderr, "Old Syntax ACTIONTERM := <EXCEEDACT>[/NOTEXCEEDACT] \n");
fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT] \n");
fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n");
fprintf(stderr, "Where: pipe is only valid for new syntax \n");
@@ -236,7 +236,8 @@ int act_parse_police(struct action_util *a,int *argc_p, char ***argv_p, int tca_
} else if (strcmp(*argv, "help") == 0) {
usage();
} else {
- break;
+ fprintf(stderr, "What is \"%s\"?\n", *argv);
+ return -1;
}
ok++;
argc--; argv++;
next prev parent reply other threads:[~2007-07-18 9:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 3:28 tc filter add ... fw ... action drop Abhijit Menon-Sen
2007-07-18 9:49 ` Patrick McHardy [this message]
2007-07-18 10:27 ` Abhijit Menon-Sen
2007-07-18 10:29 ` Patrick McHardy
2007-07-18 10:46 ` 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=469DE243.20903@trash.net \
--to=kaber@trash.net \
--cc=ams@toroid.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.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).