From 03194379a77b02df3404ec4848a50c6784e9a8a5 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Wed, 21 May 2008 14:55:04 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/tipc/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/tipc/core.c') diff --git a/net/tipc/core.c b/net/tipc/core.c index 3d97386..3256bd7 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c @@ -117,11 +117,11 @@ void tipc_core_stop_net(void) * start_net - start TIPC networking sub-systems */ -int tipc_core_start_net(void) +int tipc_core_start_net(unsigned long addr) { int res; - if ((res = tipc_net_start()) || + if ((res = tipc_net_start(addr)) || (res = tipc_eth_media_start())) { tipc_core_stop_net(); } -- cgit v1.1