From: Thomas Graf Date: Fri, 10 Nov 2006 22:11:04 +0000 (-0800) Subject: [IPv6] rules: Remove bogus tos validation check X-Git-Tag: v2.6.20-rc1~34^2~40^2~396 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f465e489c457821751f6253abaaf28c10f9d8895;p=linux-2.6 [IPv6] rules: Remove bogus tos validation check 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... Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index d587dde589..0862809ffc 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -142,8 +142,7 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb, 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) {