提交 5062430c 编写于 作者: P Patrick Caulfield 提交者: David S. Miller

[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: NPatrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4b5bdf5c
...@@ -408,11 +408,14 @@ int dn_neigh_router_hello(struct sk_buff *skb) ...@@ -408,11 +408,14 @@ int dn_neigh_router_hello(struct sk_buff *skb)
} }
} }
if (!dn_db->router) { /* Only use routers in our area */
dn_db->router = neigh_clone(neigh); if ((dn_ntohs(src)>>10) == dn_ntohs((decnet_address)>>10)) {
} else { if (!dn_db->router) {
if (msg->priority > ((struct dn_neigh *)dn_db->router)->priority) dn_db->router = neigh_clone(neigh);
neigh_release(xchg(&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); write_unlock(&neigh->lock);
neigh_release(neigh); neigh_release(neigh);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册