[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 4 Apr 2014 10:17:06 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, Cong Wang <xiyou.wangcong@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: [Patch iproute2] u32: add terminal parameter
It is useful to allow user to specify to terminate u32 filter matching
when there is no action. Currently we only terminate it when there is
an action attached.
Cc: Stephen Hemminger <stephen@...workplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
---
tc/f_u32.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index f2a862d..a64ad10 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -1129,7 +1129,14 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
}
terminal_ok++;
continue;
-
+ } else if (matches(*argv, "terminal") == 0) {
+ argc--;
+ if (argc != 0) {
+ fprintf(stderr, "Illegal \"terminal\"\n");
+ return -1;
+ }
+ terminal_ok++;
+ continue;
} else if (matches(*argv, "police") == 0) {
NEXT_ARG();
if (parse_police(&argc, &argv, TCA_U32_POLICE, n)) {
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists