Skip to contentSkip to conversation

rules: Remove bogus tos validation check

IPv6 Applied Thomas Graf 2 participants 2 messages Nov 10, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Noticed by Al Viro:

     (frh->tos & ~IPV6_FLOWINFO_MASK))

where IPV6_FLOWINFO_MASK is htonl(0xfffffff) and frh->tos is u8, which makes no sense here...

net/ipv6/fib6_rules.c +1 -2
Index: net-2.6.20/net/ipv6/fib6_rules.c
===================================================================
@@ -142,8 +142,7 @@
 	int err = -EINVAL;
 	struct fib6_rule *rule6 = (struct fib6_rule *) rule;
 
-	if (frh->src_len > 128 || frh->dst_len > 128 ||
-	    (frh->tos & ~IPV6_FLOWINFO_MASK))
+	if (frh->src_len > 128 || frh->dst_len > 128)
 		goto errout;
 
 	if (rule->action == FR_ACT_TO_TBL) {
maintainer Applied
#1 lore raw

From: Thomas Graf <[email protected]>
Date: Fri, 10 Nov 2006 13:28:38 +0100

Quoted 6 lines

Noticed by Al Viro:

     (frh->tos & ~IPV6_FLOWINFO_MASK))

where IPV6_FLOWINFO_MASK is htonl(0xfffffff) and frh->tos is u8, which makes no sense here...

Applied, thanks a lot.