Commit 9bbf28a1 authored by Patrick Caulfield's avatar Patrick Caulfield Committed by David S. Miller

[DECNET]: Fix for routing bug

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: default avatarPatrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: default avatarSteven Whitehouse <steve@chygwyn.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc49c1f9
...@@ -925,8 +925,13 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old ...@@ -925,8 +925,13 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old
for(dev_out = dev_base; dev_out; dev_out = dev_out->next) { for(dev_out = dev_base; dev_out; dev_out = dev_out->next) {
if (!dev_out->dn_ptr) if (!dev_out->dn_ptr)
continue; continue;
if (dn_dev_islocal(dev_out, oldflp->fld_src)) if (!dn_dev_islocal(dev_out, oldflp->fld_src))
break; 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); read_unlock(&dev_base_lock);
if (dev_out == NULL) if (dev_out == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment