Commit d21dd573 authored by Stephen Hemminger's avatar Stephen Hemminger

Revert "TC action parsing bug fix"

[...]
> Commands like "tc filter add dev ppp0 parent ffff: protocol ip prio 50
> u32 match ip src 0.0.0.0/0 police rate 4mbit burst 10k drop flowid :1"
> apparently no longer works. The flowid is not accepted anymore.
> Reverting commit 720a2e8d... which you authored seems to "fix" this.
[...]

After further investigation it seems clear to me that reverting the
commit 720a2e8d... is the correct thing to do, since the real
fix for the problem this commit was supposed to fix was instead fixed in
commit c29391c7...

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.

This reverts commit 720a2e8d.
parent a849d4c8
...@@ -37,7 +37,7 @@ static void usage(void) ...@@ -37,7 +37,7 @@ static void usage(void)
fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n"); fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
fprintf(stderr, " [ peakrate BPS ] [ avrate BPS ]\n"); fprintf(stderr, " [ peakrate BPS ] [ avrate BPS ]\n");
fprintf(stderr, " [ ACTIONTERM ]\n"); fprintf(stderr, " [ ACTIONTERM ]\n");
fprintf(stderr, "Old Syntax ACTIONTERM := <EXCEEDACT>[/NOTEXCEEDACT] \n"); fprintf(stderr, "Old Syntax ACTIONTERM := action <EXCEEDACT>[/NOTEXCEEDACT] \n");
fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <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: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n");
fprintf(stderr, "Where: pipe is only valid for new syntax \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_ ...@@ -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) { } else if (strcmp(*argv, "help") == 0) {
usage(); usage();
} else { } else {
fprintf(stderr, "What is \"%s\"?\n", *argv); break;
return -1;
} }
ok++; ok++;
argc--; argv++; argc--; argv++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment