[PATCH iproute2] tc: u32: Fix icmp_code off.

Subsystems: the rest

STALE5173d

2 messages, 2 authors, 2012-07-10 · open the first message on its own page

[PATCH iproute2] tc: u32: Fix icmp_code off.

From: Hiroaki SHIMODA <hidden>
Date: 2012-07-10 09:53:22

The off of icmp_code is not 20 but 21. Also offmask should be 0 unless
nexthdr+ is specified.

Signed-off-by: Hiroaki SHIMODA <redacted>
---
 tc/f_u32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 975c0b5..7a04634 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -531,7 +531,7 @@ static int parse_ip(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
 		res = parse_u8(&argc, &argv, sel, 20, 0);
 	} else if (strcmp(*argv, "icmp_code") == 0) {
 		NEXT_ARG();
-		res = parse_u8(&argc, &argv, sel, 20, 1);
+		res = parse_u8(&argc, &argv, sel, 21, 0);
 	} else
 		return -1;
 
-- 
1.7.8.6

Re: [PATCH iproute2] tc: u32: Fix icmp_code off.

From: Stephen Hemminger <hidden>
Date: 2012-07-10 22:40:38

On Tue, 10 Jul 2012 18:53:18 +0900
Hiroaki SHIMODA [off-list ref] wrote:
The off of icmp_code is not 20 but 21. Also offmask should be 0 unless
nexthdr+ is specified.

Signed-off-by: Hiroaki SHIMODA <redacted>
Both patches applied
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help