public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Patrick Caulfield <patrick@tykepenguin•com>
To: davem@davemloft•net, netdev@vger•kernel.org
Cc: steve@chygwyn•com
Subject: [PATCH] DECnet Fix for DECnet routing bug
Date: Wed, 02 Aug 2006 15:19:24 +0100	[thread overview]
Message-ID: <44D0B46C.2040500@tykepenguin.com> (raw)

This patch fixes a bug in the DECnet routing code where we were selecting
a loopback device in preference to an outward facing device even when
the destination was known non-local. This patch should fix the problem.

Signed-off-by: Patrick Caulfield <patrick@tykepenguin•com>
Signed-off-by: Steven Whitehouse <steve@chygwyn•com>

diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 1355614..743e9fc 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -925,8 +925,13 @@ static int dn_route_output_slow(struct d
 		for(dev_out = dev_base; dev_out; dev_out = dev_out->next) {
 			if (!dev_out->dn_ptr)
 				continue;
-			if (dn_dev_islocal(dev_out, oldflp->fld_src))
-				break;
+			if (!dn_dev_islocal(dev_out, oldflp->fld_src))
+				continue;
+			if ((dev_out->flags & IFF_LOOPBACK) &&
+			    oldflp->fld_dst &&
+			    !dn_dev_islocal(dev_out, oldflp->fld_dst))
+				continue;
+			break;
 		}
 		read_unlock(&dev_base_lock);
 		if (dev_out == NULL)



             reply	other threads:[~2006-08-02 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 14:19 Patrick Caulfield [this message]
2006-08-02 21:14 ` [PATCH] DECnet Fix for DECnet routing bug 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=44D0B46C.2040500@tykepenguin.com \
    --to=patrick@tykepenguin$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=steve@chygwyn$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox