diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-04 00:00:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-04 00:00:17 -0400 |
commit | 6f41617bf23a17d9cb7cc6ca8161534f05f80293 (patch) | |
tree | 2844d8d197a61b0603e31f09613e3272635dd1cc /net/tipc/node.c | |
parent | 7bdaae270cb55d40b7fb73744c7e00a7108ee5b6 (diff) | |
parent | cec4de302c5ff2c5eb3bfcb0c4845a095f5149b9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net'
overlapped the renaming of a netlink attribute in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 68014f1b6976..2afc4f8c37a7 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -111,6 +111,7 @@ struct tipc_node { | |||
111 | int action_flags; | 111 | int action_flags; |
112 | struct list_head list; | 112 | struct list_head list; |
113 | int state; | 113 | int state; |
114 | bool failover_sent; | ||
114 | u16 sync_point; | 115 | u16 sync_point; |
115 | int link_cnt; | 116 | int link_cnt; |
116 | u16 working_links; | 117 | u16 working_links; |
@@ -680,6 +681,7 @@ static void __tipc_node_link_up(struct tipc_node *n, int bearer_id, | |||
680 | *slot0 = bearer_id; | 681 | *slot0 = bearer_id; |
681 | *slot1 = bearer_id; | 682 | *slot1 = bearer_id; |
682 | tipc_node_fsm_evt(n, SELF_ESTABL_CONTACT_EVT); | 683 | tipc_node_fsm_evt(n, SELF_ESTABL_CONTACT_EVT); |
684 | n->failover_sent = false; | ||
683 | n->action_flags |= TIPC_NOTIFY_NODE_UP; | 685 | n->action_flags |= TIPC_NOTIFY_NODE_UP; |
684 | tipc_link_set_active(nl, true); | 686 | tipc_link_set_active(nl, true); |
685 | tipc_bcast_add_peer(n->net, nl, xmitq); | 687 | tipc_bcast_add_peer(n->net, nl, xmitq); |
@@ -911,6 +913,7 @@ void tipc_node_check_dest(struct net *net, u32 addr, | |||
911 | bool reset = true; | 913 | bool reset = true; |
912 | char *if_name; | 914 | char *if_name; |
913 | unsigned long intv; | 915 | unsigned long intv; |
916 | u16 session; | ||
914 | 917 | ||
915 | *dupl_addr = false; | 918 | *dupl_addr = false; |
916 | *respond = false; | 919 | *respond = false; |
@@ -997,9 +1000,10 @@ void tipc_node_check_dest(struct net *net, u32 addr, | |||
997 | goto exit; | 1000 | goto exit; |
998 | 1001 | ||
999 | if_name = strchr(b->name, ':') + 1; | 1002 | if_name = strchr(b->name, ':') + 1; |
1003 | get_random_bytes(&session, sizeof(u16)); | ||
1000 | if (!tipc_link_create(net, if_name, b->identity, b->tolerance, | 1004 | if (!tipc_link_create(net, if_name, b->identity, b->tolerance, |
1001 | b->net_plane, b->mtu, b->priority, | 1005 | b->net_plane, b->mtu, b->priority, |
1002 | b->window, mod(tipc_net(net)->random), | 1006 | b->window, session, |
1003 | tipc_own_addr(net), addr, peer_id, | 1007 | tipc_own_addr(net), addr, peer_id, |
1004 | n->capabilities, | 1008 | n->capabilities, |
1005 | tipc_bc_sndlink(n->net), n->bc_entry.link, | 1009 | tipc_bc_sndlink(n->net), n->bc_entry.link, |
@@ -1615,6 +1619,14 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb, | |||
1615 | tipc_skb_queue_splice_tail_init(tipc_link_inputq(pl), | 1619 | tipc_skb_queue_splice_tail_init(tipc_link_inputq(pl), |
1616 | tipc_link_inputq(l)); | 1620 | tipc_link_inputq(l)); |
1617 | } | 1621 | } |
1622 | /* If parallel link was already down, and this happened before | ||
1623 | * the tunnel link came up, FAILOVER was never sent. Ensure that | ||
1624 | * FAILOVER is sent to get peer out of NODE_FAILINGOVER state. | ||
1625 | */ | ||
1626 | if (n->state != NODE_FAILINGOVER && !n->failover_sent) { | ||
1627 | tipc_link_create_dummy_tnl_msg(l, xmitq); | ||
1628 | n->failover_sent = true; | ||
1629 | } | ||
1618 | /* If pkts arrive out of order, use lowest calculated syncpt */ | 1630 | /* If pkts arrive out of order, use lowest calculated syncpt */ |
1619 | if (less(syncpt, n->sync_point)) | 1631 | if (less(syncpt, n->sync_point)) |
1620 | n->sync_point = syncpt; | 1632 | n->sync_point = syncpt; |