aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-05-21 17:55:04 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-21 17:55:04 -0400
commit03194379a77b02df3404ec4848a50c6784e9a8a5 (patch)
treef76ddd4c02f71f5ed03da0729d563f81d701f267 /net/tipc/config.c
parent6d4a6672c8263f98544d2b91690dc7074b144090 (diff)
tipc: Fix initialization sequence problems when entering network mode
This patch ensures that TIPC's topology service and configuration service are shut down before switching into "network mode". This ensures that TIPC does not mistakenly try to send unnecessary "publication withdraw" messages to other nodes before it is fully initialized for sending off-node messages. Note that the node's current network address is now updated only after the two services are shut down; this ensures that any existing connections to the topology server are terminated correctly using the old address. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r--net/tipc/config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 16e7cb74969b..ca3544d030c7 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -293,7 +293,6 @@ static struct sk_buff *cfg_set_own_addr(void)
293 if (tipc_mode == TIPC_NET_MODE) 293 if (tipc_mode == TIPC_NET_MODE)
294 return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED 294 return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
295 " (cannot change node address once assigned)"); 295 " (cannot change node address once assigned)");
296 tipc_own_addr = addr;
297 296
298 /* 297 /*
299 * Must release all spinlocks before calling start_net() because 298 * Must release all spinlocks before calling start_net() because
@@ -306,7 +305,7 @@ static struct sk_buff *cfg_set_own_addr(void)
306 */ 305 */
307 306
308 spin_unlock_bh(&config_lock); 307 spin_unlock_bh(&config_lock);
309 tipc_core_start_net(); 308 tipc_core_start_net(addr);
310 spin_lock_bh(&config_lock); 309 spin_lock_bh(&config_lock);
311 return tipc_cfg_reply_none(); 310 return tipc_cfg_reply_none();
312} 311}