summaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2014-02-11 11:38:26 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-13 16:35:05 -0500
commit64380a04deeed4720de76b086a3a4eab8dd41671 (patch)
treefff21ed581434a3ecb936c6127ae3e7905d9c3a1 /net/tipc/core.h
parentd15891ca1fdd7f1f46cede1dc15bcfbf0445a658 (diff)
downloadlinux-64380a04deeed4720de76b086a3a4eab8dd41671.tar.bz2
tipc: fix message corruption bug for deferred packets
If a packet received on a link is out-of-sequence, it will be placed on a deferred queue and later reinserted in the receive path once the preceding packets have been processed. The problem with this is that it will be subject to the buffer adjustment from link_recv_buf_validate twice. The second adjustment for 20 bytes header space will corrupt the packet. We solve this by tagging the deferred packets and bail out from receive buffer validation for packets that have already been subjected to this. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 1ff477b0450d..5569d96b4da3 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -192,6 +192,7 @@ static inline void k_term_timer(struct timer_list *timer)
struct tipc_skb_cb {
void *handle;
+ bool deferred;
};
#define TIPC_SKB_CB(__skb) ((struct tipc_skb_cb *)&((__skb)->cb[0]))