Skip to content

Commit

Permalink
tipc: fix link priority propagation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Richard Alpe authored and davem330 committed Feb 6, 2016
1 parent d01332f commit 8172981
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,12 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
if (in_range(peers_tol, TIPC_MIN_LINK_TOL, TIPC_MAX_LINK_TOL))
l->tolerance = peers_tol;

if (peers_prio && in_range(peers_prio, TIPC_MIN_LINK_PRI,
TIPC_MAX_LINK_PRI)) {
l->priority = peers_prio;
rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT);
}

l->silent_intv_cnt = 0;
l->stats.recv_states++;
if (msg_probe(hdr))
Expand Down

0 comments on commit 8172981

Please sign in to comment.