Skip to content
This repository was archived by the owner on Sep 24, 2020. It is now read-only.

Commit 8172981

Browse files
Richard Alpedavem330
authored andcommitted
tipc: fix link priority propagation
Currently link priority changes isn't handled for active links. In this patch we resolve this by changing our priority if the peer passes a valid priority in a state message. Reviewed-by: Jon Maloy <[email protected]> Signed-off-by: Richard Alpe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d01332f commit 8172981

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/tipc/link.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,12 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
14581458
if (in_range(peers_tol, TIPC_MIN_LINK_TOL, TIPC_MAX_LINK_TOL))
14591459
l->tolerance = peers_tol;
14601460

1461+
if (peers_prio && in_range(peers_prio, TIPC_MIN_LINK_PRI,
1462+
TIPC_MAX_LINK_PRI)) {
1463+
l->priority = peers_prio;
1464+
rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT);
1465+
}
1466+
14611467
l->silent_intv_cnt = 0;
14621468
l->stats.recv_states++;
14631469
if (msg_probe(hdr))

0 commit comments

Comments
 (0)