aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorPatrick Caulfield <patrick@tykepenguin.com>2006-01-03 14:24:02 -0800
committerDavid S. Miller <davem@davemloft.net>2006-01-03 14:24:02 -0800
commit5062430c5cc526655e3d10c670fc9c263656f66c (patch)
tree6e68b3077a5fcf2a5d9a896223585f8c9d45204b /net/decnet
parent[IPVS]: Cleanup IP_VS_DBG statements. (diff)
downloadlinux-dev-5062430c5cc526655e3d10c670fc9c263656f66c.tar.xz
linux-dev-5062430c5cc526655e3d10c670fc9c263656f66c.zip
[DECNET]: Only use local routers
The attached patch makes DECnet routing only use routers from the same area - rather than the highest rated router seen. In theory there should not be an out-of-area router on a local network but some networks are bridged rather than properly routed. VMS seems to behave similarly: if I bring up a VMS node with no router then it can't see anything else on the global network. Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_neigh.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c
index 8d0cc3cf3e49..33ab256cfd4a 100644
--- a/net/decnet/dn_neigh.c
+++ b/net/decnet/dn_neigh.c
@@ -408,11 +408,14 @@ int dn_neigh_router_hello(struct sk_buff *skb)
}
}
- if (!dn_db->router) {
- dn_db->router = neigh_clone(neigh);
- } else {
- if (msg->priority > ((struct dn_neigh *)dn_db->router)->priority)
- neigh_release(xchg(&dn_db->router, neigh_clone(neigh)));
+ /* Only use routers in our area */
+ if ((dn_ntohs(src)>>10) == dn_ntohs((decnet_address)>>10)) {
+ if (!dn_db->router) {
+ dn_db->router = neigh_clone(neigh);
+ } else {
+ if (msg->priority > ((struct dn_neigh *)dn_db->router)->priority)
+ neigh_release(xchg(&dn_db->router, neigh_clone(neigh)));
+ }
}
write_unlock(&neigh->lock);
neigh_release(neigh);