From: Steven Whitehouse Date: Fri, 11 Aug 2006 23:44:18 +0000 (-0700) Subject: [DECNET] Fix to decnet rules compare function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1aa62f15b511457af2233150c960dc1fd02769b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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: Steven Whitehouse Signed-off-by: David S. Miller --- diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index c8d9411e5943..977bb56c3ce4 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -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;