From: Jon M. <jon...@er...> - 2019-07-16 20:27:34
|
Acked-by: Jon Maloy <jon...@er...> Remember to mark this one as 'net' and not 'net-next' when you post it. > -----Original Message----- > From: Hoang Le <hoa...@de...> > Sent: 16-Jul-19 03:26 > To: Jon Maloy <jon...@er...>; ma...@do...; > yin...@wi...; tip...@li... > Subject: [net-next] tipc: fix retransmission failure when link re-established > > Currently a link is declared stale and reset if stale limit time is longer than link > tolerance time. But, this stale limit does not initial correctly when the link is > resetting. This lead to a link declared as failure because reset criteria always > passed though no packet re-transmitted when link is re-establishing. > > To fix this, we set stale limit time far into the future in two places: > reset a link and acked from peer. > > Fixes: 77cf8edbc0e7 ("tipc: simplify stale link failure criteria") > Signed-off-by: Hoang Le <hoa...@de...> > --- > net/tipc/link.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/tipc/link.c b/net/tipc/link.c index > 66d3a07bc571..2ba79d451f08 100644 > --- a/net/tipc/link.c > +++ b/net/tipc/link.c > @@ -909,6 +909,7 @@ void tipc_link_reset(struct tipc_link *l) > l->silent_intv_cnt = 0; > l->rst_cnt = 0; > l->bc_peer_is_up = false; > + l->stale_limit = msecs_to_jiffies(~0); > memset(&l->mon_state, 0, sizeof(l->mon_state)); > tipc_link_reset_stats(l); > } > @@ -1510,6 +1511,7 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff > *skb, > > /* Forward queues and wake up waiting users */ > if (likely(tipc_link_release_pkts(l, msg_ack(hdr)))) { > + l->stale_limit = msecs_to_jiffies(~0); > tipc_link_advance_backlog(l, xmitq); > if (unlikely(!skb_queue_empty(&l->wakeupq))) > link_prepare_wakeup(l); > -- > 2.17.1 |