Commit d1aa62f1 authored by Steven Whitehouse's avatar Steven Whitehouse Committed by David S. Miller

[DECNET] Fix to decnet rules compare function

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: default avatarSteven Whitehouse <steve@chygwyn.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d880309a
...@@ -197,10 +197,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, ...@@ -197,10 +197,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
return 0; return 0;
#endif #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; 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 0;
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment