From: Allan Stephens Date: Mon, 26 Jun 2006 06:39:31 +0000 (-0700) Subject: [TIPC]: Links now validate destination node specified by incoming messages. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=260082471ed3f6d751e9767e5a278d4e495d83f7;p=linux-beck.git [TIPC]: Links now validate destination node specified by incoming messages. This fix prevents link flopping and name table inconsistency problems arising when a node is assigned a different value than it used previously. (Changing the value causes other nodes to have two link endpoints sending to the same MAC address using two different destination values, requiring the receiving node to filter out the unwanted messages.) Signed-off-by: Allan Stephens Signed-off-by: Per Liden Signed-off-by: David S. Miller --- diff --git a/net/tipc/link.c b/net/tipc/link.c index 784b24b6d102..955b87d9b46c 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1720,6 +1720,11 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) link_recv_non_seq(buf); continue; } + + if (unlikely(!msg_short(msg) && + (msg_destnode(msg) != tipc_own_addr))) + goto cont; + n_ptr = tipc_node_find(msg_prevnode(msg)); if (unlikely(!n_ptr)) goto cont;