aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2014-04-03 02:28:01 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-03 16:03:57 -0400
commita5e7ac5ce134d8f72f59631011fafa7bbf7ca174 (patch)
tree97f653270c3466043626174702ec2352a79d406f /net/tipc/net.c
parentd9bd6461681c78fbe18087c20b4bb47845cd5564 (diff)
tipc: fix regression bug where node events are not being generated
Commit 5902385a2440a55f005b266c93e0bb9398e5a62b ("tipc: obsolete the remote management feature") introduces a regression where node topology events are not being generated because the publication that triggers this: {0, <z.c.n>, <z.c.n>} is no longer available. This will break applications that rely on node events to discover when nodes join/leave a cluster. We fix this by advertising the node publication when TIPC enters networking mode, and withdraws it upon shutdown. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 0374a817631e..4c564eb69e1a 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -182,6 +182,8 @@ void tipc_net_start(u32 addr)
182 tipc_bclink_init(); 182 tipc_bclink_init();
183 write_unlock_bh(&tipc_net_lock); 183 write_unlock_bh(&tipc_net_lock);
184 184
185 tipc_nametbl_publish(TIPC_CFG_SRV, tipc_own_addr, tipc_own_addr,
186 TIPC_ZONE_SCOPE, 0, tipc_own_addr);
185 pr_info("Started in network mode\n"); 187 pr_info("Started in network mode\n");
186 pr_info("Own node address %s, network identity %u\n", 188 pr_info("Own node address %s, network identity %u\n",
187 tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); 189 tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
@@ -192,6 +194,7 @@ void tipc_net_stop(void)
192 if (!tipc_own_addr) 194 if (!tipc_own_addr)
193 return; 195 return;
194 196
197 tipc_nametbl_withdraw(TIPC_CFG_SRV, tipc_own_addr, 0, tipc_own_addr);
195 write_lock_bh(&tipc_net_lock); 198 write_lock_bh(&tipc_net_lock);
196 tipc_bearer_stop(); 199 tipc_bearer_stop();
197 tipc_bclink_stop(); 200 tipc_bclink_stop();