]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[IPv6] rules: Remove bogus tos validation check
authorThomas Graf <tgraf@suug.ch>
Fri, 10 Nov 2006 22:11:04 +0000 (14:11 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:22:12 +0000 (21:22 -0800)
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 <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/fib6_rules.c

index d587dde5897e7087e68b84cefd45080a16a3ea9a..0862809ffcf7abad0a4593126c9cccf3e8b29da5 100644 (file)
@@ -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) {