diff options
Diffstat (limited to 'net/tipc/net.c')
| -rw-r--r-- | net/tipc/net.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index 61afee7e8291..d4531b07076c 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
| @@ -117,7 +117,7 @@ static void net_route_named_msg(struct sk_buff *buf) | |||
| 117 | u32 dport; | 117 | u32 dport; |
| 118 | 118 | ||
| 119 | if (!msg_named(msg)) { | 119 | if (!msg_named(msg)) { |
| 120 | buf_discard(buf); | 120 | kfree_skb(buf); |
| 121 | return; | 121 | return; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| @@ -161,7 +161,7 @@ void tipc_net_route_msg(struct sk_buff *buf) | |||
| 161 | tipc_port_recv_proto_msg(buf); | 161 | tipc_port_recv_proto_msg(buf); |
| 162 | break; | 162 | break; |
| 163 | default: | 163 | default: |
| 164 | buf_discard(buf); | 164 | kfree_skb(buf); |
| 165 | } | 165 | } |
| 166 | return; | 166 | return; |
| 167 | } | 167 | } |
| @@ -175,14 +175,10 @@ int tipc_net_start(u32 addr) | |||
| 175 | { | 175 | { |
| 176 | char addr_string[16]; | 176 | char addr_string[16]; |
| 177 | 177 | ||
| 178 | if (tipc_mode != TIPC_NODE_MODE) | ||
| 179 | return -ENOPROTOOPT; | ||
| 180 | |||
| 181 | tipc_subscr_stop(); | 178 | tipc_subscr_stop(); |
| 182 | tipc_cfg_stop(); | 179 | tipc_cfg_stop(); |
| 183 | 180 | ||
| 184 | tipc_own_addr = addr; | 181 | tipc_own_addr = addr; |
| 185 | tipc_mode = TIPC_NET_MODE; | ||
| 186 | tipc_named_reinit(); | 182 | tipc_named_reinit(); |
| 187 | tipc_port_reinit(); | 183 | tipc_port_reinit(); |
| 188 | 184 | ||
| @@ -201,10 +197,9 @@ void tipc_net_stop(void) | |||
| 201 | { | 197 | { |
| 202 | struct tipc_node *node, *t_node; | 198 | struct tipc_node *node, *t_node; |
| 203 | 199 | ||
| 204 | if (tipc_mode != TIPC_NET_MODE) | 200 | if (!tipc_own_addr) |
| 205 | return; | 201 | return; |
| 206 | write_lock_bh(&tipc_net_lock); | 202 | write_lock_bh(&tipc_net_lock); |
| 207 | tipc_mode = TIPC_NODE_MODE; | ||
| 208 | tipc_bearer_stop(); | 203 | tipc_bearer_stop(); |
| 209 | tipc_bclink_stop(); | 204 | tipc_bclink_stop(); |
| 210 | list_for_each_entry_safe(node, t_node, &tipc_node_list, list) | 205 | list_for_each_entry_safe(node, t_node, &tipc_node_list, list) |
