aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 7c70034b1073..85ad5c0678d0 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1425,6 +1425,10 @@ static void tipc_link_build_proto_msg(struct tipc_link *l, int mtyp, bool probe,
1425 l->rcv_unacked = 0; 1425 l->rcv_unacked = 0;
1426 } else { 1426 } else {
1427 /* RESET_MSG or ACTIVATE_MSG */ 1427 /* RESET_MSG or ACTIVATE_MSG */
1428 if (mtyp == ACTIVATE_MSG) {
1429 msg_set_dest_session_valid(hdr, 1);
1430 msg_set_dest_session(hdr, l->peer_session);
1431 }
1428 msg_set_max_pkt(hdr, l->advertised_mtu); 1432 msg_set_max_pkt(hdr, l->advertised_mtu);
1429 strcpy(data, l->if_name); 1433 strcpy(data, l->if_name);
1430 msg_set_size(hdr, INT_H_SIZE + TIPC_MAX_IF_NAME); 1434 msg_set_size(hdr, INT_H_SIZE + TIPC_MAX_IF_NAME);
@@ -1642,6 +1646,17 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
1642 rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT); 1646 rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT);
1643 break; 1647 break;
1644 } 1648 }
1649
1650 /* If this endpoint was re-created while peer was ESTABLISHING
1651 * it doesn't know current session number. Force re-synch.
1652 */
1653 if (mtyp == ACTIVATE_MSG && msg_dest_session_valid(hdr) &&
1654 l->session != msg_dest_session(hdr)) {
1655 if (less(l->session, msg_dest_session(hdr)))
1656 l->session = msg_dest_session(hdr) + 1;
1657 break;
1658 }
1659
1645 /* ACTIVATE_MSG serves as PEER_RESET if link is already down */ 1660 /* ACTIVATE_MSG serves as PEER_RESET if link is already down */
1646 if (mtyp == RESET_MSG || !link_is_up(l)) 1661 if (mtyp == RESET_MSG || !link_is_up(l))
1647 rc = tipc_link_fsm_evt(l, LINK_PEER_RESET_EVT); 1662 rc = tipc_link_fsm_evt(l, LINK_PEER_RESET_EVT);