aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-10-15 14:52:43 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-15 23:55:21 -0700
commit8306f99a517b91ebf8fa94d017c2c84ca62e107c (patch)
treebbcdfbe08e36290dec053b7a155c5a4320987ee0 /net/tipc/link.c
parenttipc: improve sequence number checking (diff)
downloadlinux-dev-8306f99a517b91ebf8fa94d017c2c84ca62e107c.tar.xz
linux-dev-8306f99a517b91ebf8fa94d017c2c84ca62e107c.zip
tipc: disallow packet duplicates in link deferred queue
After the previous commits, we are guaranteed that no packets of type LINK_PROTOCOL or with illegal sequence numbers will be attempted added to the link deferred queue. This makes it possible to make some simplifications to the sorting algorithm in the function tipc_skb_queue_sorted(). We also alter the function so that it will drop packets if one with the same seqeunce number is already present in the queue. This is necessary because we have identified weird packet sequences, involving duplicate packets, where a legitimate in-sequence packet may advance to the head of the queue without being detected and de-queued. Finally, we make this function outline, since it will now be called only in exceptional cases. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 2b549f653d80..e7c608631276 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1114,7 +1114,7 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb,
/* Defer delivery if sequence gap */
if (unlikely(seqno != rcv_nxt)) {
- __tipc_skb_queue_sorted(defq, skb);
+ __tipc_skb_queue_sorted(defq, seqno, skb);
tipc_link_build_nack_msg(l, xmitq);
break;
}