]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix bug in link protocol message create function
authorJon Paul Maloy <jon.maloy@ericsson.com>
Tue, 26 May 2015 09:40:19 +0000 (05:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2015 23:43:03 +0000 (19:43 -0400)
commitf516333c5012311a9ed75e219cd40756a98202af
tree48a2abb9c3783e64a93770a5ea43889d9445cd23
parent01e4614a21b708810e91feae2844980f07ae8eed
tipc: fix bug in link protocol message create function

In commit d63722b20154e6098d9aa73f028c5a3216fe27ff
("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>
net/tipc/link.c