Skip to content

Commit

Permalink
[DECNET]: Fix for routing bug
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick Caulfield authored and David S. Miller committed Aug 2, 2006
1 parent dc49c1f commit 9bbf28a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
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)
Expand Down

0 comments on commit 9bbf28a

Please sign in to comment.