Skip to contentSkip to conversation

Fix to decnet rules compare function

DECNET Applied Steven Whitehouse 2 participants 2 messages Aug 11, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Here is a fix to the DECnet rules compare function where we used 32bit values rather than 16bit values. Spotted by Patrick McHardy.

Cc Patrick McHardy <[email protected]>
Cc Patrick Caulfield <[email protected]>
net/decnet/dn_rules.c +2 -2
index 878312f..977bb56 100644
@@ -196,10 +197,10 @@ static int dn_fib_rule_compare(struct fi
 		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;