netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [DECNET] Fix to decnet rules compare function
@ 2006-08-11 15:54 Steven Whitehouse
  2006-08-11 23:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Whitehouse @ 2006-08-11 15:54 UTC (permalink / raw)
  To: David Miller; +Cc: Patrick McHardy, Patrick Caulfield, netdev



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 <kaber@trash.net>
Cc: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>


diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index 878312f..977bb56 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-11 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11 15:54 [DECNET] Fix to decnet rules compare function Steven Whitehouse
2006-08-11 23:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).