From ef1d6f97ec725e5e942f092ab4f5a4ceff17bb9c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 2 Jan 2008 16:34:58 -0800 Subject: [PATCH] Revert "TC action parsing bug fix" This reverts commit 720a2e8d990707749b2cafa77ab3cd2b8241ec47. After further investigation it seems clear to me that reverting the commit 720a2e8d990707749b2... is the correct thing to do, since the real fix for the problem this commit was supposed to fix was instead fixed in commit c29391c7c68f031e246c... Whatever you specify after a u32 police you will now get a syntax error, and according to "tc filter add u32 help" there are several things that you are supposed to be able to specify after a police. So, Steven, please revert 720a2e8d990707749b2... --- tc/m_police.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tc/m_police.c b/tc/m_police.c index acdfd223..46c785b6 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 := [/NOTEXCEEDACT] \n"); + fprintf(stderr, "Old Syntax ACTIONTERM := action [/NOTEXCEEDACT] \n"); fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed [/NOTEXCEEDACT] \n"); fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n"); fprintf(stderr, "Where: pipe is only valid for new syntax \n"); @@ -237,8 +237,7 @@ int act_parse_police(struct action_util *a,int *argc_p, char ***argv_p, int tca_ } else if (strcmp(*argv, "help") == 0) { usage(); } else { - fprintf(stderr, "What is \"%s\"?\n", *argv); - return -1; + break; } ok++; argc--; argv++;