Skip to content

Commit

Permalink
tipc: fix bug in link protocol message create function
Browse files Browse the repository at this point in the history
In commit dd3f9e7
("tipc: add packet sequence number at instant of transmission") we
made a change with the consequence that packets in the link backlog
queue don't contain valid sequence numbers.

However, when we create a link protocol message, we still use the
sequence number of the first packet in the backlog, if there is any,
as "next_sent" indicator in the message. This may entail unnecessary
retransissions or stale packet transmission when there is very low
traffic on the link.

This commit fixes this issue by only using the current value of
tipc_link::snd_nxt as indicator.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Paul Maloy authored and David S. Miller committed May 26, 2015
1 parent 05c9854 commit f3903bc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,6 @@ void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,

if (!tipc_link_is_up(l_ptr))
return;
if (skb_queue_len(&l_ptr->backlogq))
next_sent = buf_seqno(skb_peek(&l_ptr->backlogq));
msg_set_next_sent(msg, next_sent);
if (!skb_queue_empty(&l_ptr->deferdq)) {
last_rcv = buf_seqno(skb_peek(&l_ptr->deferdq));
Expand Down

0 comments on commit f3903bc

Please sign in to comment.