Skip to content

Commit

Permalink
[DECNET] Fix to decnet rules compare function
Browse files Browse the repository at this point in the history
Here is a fix to the DECnet rules compare function where we used 32bit
values rather than 16bit values. Spotted by Patrick McHardy.

Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steven Whitehouse authored and David S. Miller committed Sep 22, 2006
1 parent d880309 commit d1aa62f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/decnet/dn_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
return 0;
#endif

if (tb[FRA_SRC] && (r->src != nla_get_u32(tb[FRA_SRC])))
if (tb[FRA_SRC] && (r->src != nla_get_u16(tb[FRA_SRC])))
return 0;

if (tb[FRA_DST] && (r->dst != nla_get_u32(tb[FRA_DST])))
if (tb[FRA_DST] && (r->dst != nla_get_u16(tb[FRA_DST])))
return 0;

return 1;
Expand Down

0 comments on commit d1aa62f

Please sign in to comment.