From f0712e86b75f4839773abbc01d5baa7e36e378c2 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 17 Apr 2012 18:42:28 -0400 Subject: tipc: Ensure network address change doesn't impact local connections Revises routines that deal with connections between two ports on the same node to ensure the connection is not impacted if the node's network address is changed in mid-operation. The routines now treat the default node address of <0.0.0> as an alias for "this node" in the following situations: 1) Incoming messages destined to a connected port now handle the alias properly when validating that the message was sent by the expected peer port, ensuring that the message will be accepted regardless of whether it specifies the node's old network address or it's current one. 2) The code which completes connection establishment now handles the alias properly when determining if the peer port is on the same node as the connected port. An added benefit of addressing issue 1) is that some peer port validation code has been relocated to TIPC's socket subsystem, which means that validation is no longer done twice when a message is sent to a non-socket port (such as TIPC's configuration service or network topology service). Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- net/tipc/node_subscr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/tipc/node_subscr.c') diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index c3c2815ae630..327ffbbfee00 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c @@ -45,7 +45,7 @@ void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, void *usr_handle, net_ev_handler handle_down) { - if (addr == tipc_own_addr) { + if (in_own_node(addr)) { node_sub->node = NULL; return; } -- cgit v1.2.3