[Linux-decnet-user] Fix for DECnet routing bug
Brought to you by:
chrissie_c,
ph3-der-loewe
|
From: Steven W. <st...@ch...> - 2006-07-28 20:02:54
|
Hi,
I've had this one on my list for a while. Does this fix the DECnet routing
bug that you reported the other day? If so please send to davem,
Steve.
------------------------------------------------------------------------------
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: Steven Whitehouse <st...@ch...>
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)
|