diff options
author | David S. Miller <davem@davemloft.net> | 2019-03-27 20:37:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-27 20:37:58 -0400 |
commit | 356d71e00d278d865f8c7f68adebd6ce4698a7e2 (patch) | |
tree | 8cb2dabf7440b56c6dee76b4253210c6b603b98e /net/tipc | |
parent | df453700e8d81b1bdafdf684365ee2b9431fb702 (diff) | |
parent | 1a9df9e29c2afecf6e3089442d429b377279ca3c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/net.c | 5 | ||||
-rw-r--r-- | net/tipc/node.c | 7 | ||||
-rw-r--r-- | net/tipc/topsrv.c | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index f076edb74338..7ce1e86b024f 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -163,12 +163,9 @@ void tipc_sched_net_finalize(struct net *net, u32 addr) | |||
163 | 163 | ||
164 | void tipc_net_stop(struct net *net) | 164 | void tipc_net_stop(struct net *net) |
165 | { | 165 | { |
166 | u32 self = tipc_own_addr(net); | 166 | if (!tipc_own_id(net)) |
167 | |||
168 | if (!self) | ||
169 | return; | 167 | return; |
170 | 168 | ||
171 | tipc_nametbl_withdraw(net, TIPC_CFG_SRV, self, self, self); | ||
172 | rtnl_lock(); | 169 | rtnl_lock(); |
173 | tipc_bearer_stop(net); | 170 | tipc_bearer_stop(net); |
174 | tipc_node_stop(net); | 171 | tipc_node_stop(net); |
diff --git a/net/tipc/node.c b/net/tipc/node.c index 2717893e9dbe..3469b5d4ed32 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -835,10 +835,10 @@ static void __tipc_node_link_down(struct tipc_node *n, int *bearer_id, | |||
835 | static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete) | 835 | static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete) |
836 | { | 836 | { |
837 | struct tipc_link_entry *le = &n->links[bearer_id]; | 837 | struct tipc_link_entry *le = &n->links[bearer_id]; |
838 | struct tipc_media_addr *maddr = NULL; | ||
838 | struct tipc_link *l = le->link; | 839 | struct tipc_link *l = le->link; |
839 | struct tipc_media_addr *maddr; | ||
840 | struct sk_buff_head xmitq; | ||
841 | int old_bearer_id = bearer_id; | 840 | int old_bearer_id = bearer_id; |
841 | struct sk_buff_head xmitq; | ||
842 | 842 | ||
843 | if (!l) | 843 | if (!l) |
844 | return; | 844 | return; |
@@ -862,7 +862,8 @@ static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete) | |||
862 | tipc_node_write_unlock(n); | 862 | tipc_node_write_unlock(n); |
863 | if (delete) | 863 | if (delete) |
864 | tipc_mon_remove_peer(n->net, n->addr, old_bearer_id); | 864 | tipc_mon_remove_peer(n->net, n->addr, old_bearer_id); |
865 | tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr); | 865 | if (!skb_queue_empty(&xmitq)) |
866 | tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr); | ||
866 | tipc_sk_rcv(n->net, &le->inputq); | 867 | tipc_sk_rcv(n->net, &le->inputq); |
867 | } | 868 | } |
868 | 869 | ||
diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 4a708a4e8583..b45932d78004 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c | |||
@@ -363,6 +363,7 @@ static int tipc_conn_rcv_sub(struct tipc_topsrv *srv, | |||
363 | struct tipc_subscription *sub; | 363 | struct tipc_subscription *sub; |
364 | 364 | ||
365 | if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) { | 365 | if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) { |
366 | s->filter &= __constant_ntohl(~TIPC_SUB_CANCEL); | ||
366 | tipc_conn_delete_sub(con, s); | 367 | tipc_conn_delete_sub(con, s); |
367 | return 0; | 368 | return 0; |
368 | } | 369 | } |