From: Patrick McHardy <kaber@trash.net>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Abhijit Menon-Sen <ams@toroid.org>, netdev@vger.kernel.org
Subject: Re: tc filter add ... fw ... action drop
Date: Wed, 18 Jul 2007 12:46:20 +0200 [thread overview]
Message-ID: <469DEF7C.8040709@trash.net> (raw)
In-Reply-To: <469DEB9A.9020606@trash.net>
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Patrick McHardy wrote:
> Abhijit Menon-Sen wrote:
>
>>That command is from a script that used to work with iproute2-ss020116
>>(2002!), which had the following in tc/m_police.c:
>>
>>210 } else if (strcmp(*argv, "action") == 0) {
>>211 NEXT_ARG();
>>212 if (get_police_result(&p.action, &presult, *argv)) {
>>
>>I don't know when that bit was dropped, but it used to be there. :-)
>
>
>
> Indeed, I missed that. I'll fix up the patch ..
OK this patch fixes parsing of "action ...". I've removed
the erroring on unknown arguments again since in that case
the caller should continue parsing.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 585 bytes --]
diff --git a/tc/m_police.c b/tc/m_police.c
index 36a7719..76cdbe1 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -227,7 +227,8 @@ int act_parse_police(struct action_util *a,int *argc_p, char ***argv_p, int tca_
p.action = TC_POLICE_OK;
} else if (matches(*argv, "pipe") == 0) {
p.action = TC_POLICE_PIPE;
- } else if (strcmp(*argv, "conform-exceed") == 0) {
+ } else if (strcmp(*argv, "action") == 0 ||
+ strcmp(*argv, "conform-exceed") == 0) {
NEXT_ARG();
if (get_police_result(&p.action, &presult, *argv)) {
fprintf(stderr, "Illegal \"action\"\n");
prev parent reply other threads:[~2007-07-18 10:46 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
2007-07-18 10:27 ` Abhijit Menon-Sen
2007-07-18 10:29 ` Patrick McHardy
2007-07-18 10:46 ` Patrick McHardy [this message]
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=469DEF7C.8040709@trash.net \
--to=kaber@trash.net \
--cc=ams@toroid.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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).