aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 7d305ecc09c2..4c564eb69e1a 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -146,19 +146,19 @@ void tipc_net_route_msg(struct sk_buff *buf)
146 if (tipc_in_scope(dnode, tipc_own_addr)) { 146 if (tipc_in_scope(dnode, tipc_own_addr)) {
147 if (msg_isdata(msg)) { 147 if (msg_isdata(msg)) {
148 if (msg_mcast(msg)) 148 if (msg_mcast(msg))
149 tipc_port_recv_mcast(buf, NULL); 149 tipc_port_mcast_rcv(buf, NULL);
150 else if (msg_destport(msg)) 150 else if (msg_destport(msg))
151 tipc_port_recv_msg(buf); 151 tipc_port_rcv(buf);
152 else 152 else
153 net_route_named_msg(buf); 153 net_route_named_msg(buf);
154 return; 154 return;
155 } 155 }
156 switch (msg_user(msg)) { 156 switch (msg_user(msg)) {
157 case NAME_DISTRIBUTOR: 157 case NAME_DISTRIBUTOR:
158 tipc_named_recv(buf); 158 tipc_named_rcv(buf);
159 break; 159 break;
160 case CONN_MANAGER: 160 case CONN_MANAGER:
161 tipc_port_recv_proto_msg(buf); 161 tipc_port_proto_rcv(buf);
162 break; 162 break;
163 default: 163 default:
164 kfree_skb(buf); 164 kfree_skb(buf);
@@ -168,7 +168,7 @@ void tipc_net_route_msg(struct sk_buff *buf)
168 168
169 /* Handle message for another node */ 169 /* Handle message for another node */
170 skb_trim(buf, msg_size(msg)); 170 skb_trim(buf, msg_size(msg));
171 tipc_link_send(buf, dnode, msg_link_selector(msg)); 171 tipc_link_xmit(buf, dnode, msg_link_selector(msg));
172} 172}
173 173
174void tipc_net_start(u32 addr) 174void tipc_net_start(u32 addr)
@@ -182,8 +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_cfg_reinit(); 185 tipc_nametbl_publish(TIPC_CFG_SRV, tipc_own_addr, tipc_own_addr,
186 186 TIPC_ZONE_SCOPE, 0, tipc_own_addr);
187 pr_info("Started in network mode\n"); 187 pr_info("Started in network mode\n");
188 pr_info("Own node address %s, network identity %u\n", 188 pr_info("Own node address %s, network identity %u\n",
189 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);
@@ -191,15 +191,15 @@ void tipc_net_start(u32 addr)
191 191
192void tipc_net_stop(void) 192void tipc_net_stop(void)
193{ 193{
194 struct tipc_node *node, *t_node;
195
196 if (!tipc_own_addr) 194 if (!tipc_own_addr)
197 return; 195 return;
196
197 tipc_nametbl_withdraw(TIPC_CFG_SRV, tipc_own_addr, 0, tipc_own_addr);
198 write_lock_bh(&tipc_net_lock); 198 write_lock_bh(&tipc_net_lock);
199 tipc_bearer_stop(); 199 tipc_bearer_stop();
200 tipc_bclink_stop(); 200 tipc_bclink_stop();
201 list_for_each_entry_safe(node, t_node, &tipc_node_list, list) 201 tipc_node_stop();
202 tipc_node_delete(node);
203 write_unlock_bh(&tipc_net_lock); 202 write_unlock_bh(&tipc_net_lock);
203
204 pr_info("Left network mode\n"); 204 pr_info("Left network mode\n");
205} 205}