All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <steve@chygwyn.com>
To: David Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>,
	Patrick Caulfield <patrick@tykepenguin.com>,
	netdev@vger.kernel.org
Subject: [DECNET] Fix to decnet rules compare function
Date: Fri, 11 Aug 2006 16:54:06 +0100	[thread overview]
Message-ID: <20060811155406.GA560@souterrain.chygwyn.com> (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 <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;

             reply	other threads:[~2006-08-11 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-11 15:54 Steven Whitehouse [this message]
2006-08-11 23:44 ` [DECNET] Fix to decnet rules compare function David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060811155406.GA560@souterrain.chygwyn.com \
    --to=steve@chygwyn.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=patrick@tykepenguin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.