Skip to content

Commit

Permalink
[IPv6] rules: Remove bogus tos validation check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Dec 3, 2006
1 parent 339bf98 commit f465e48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/fib6_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f465e48

Please sign in to comment.