summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-02-19 01:24:22 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-19 01:24:22 -0500
commit1e8d6421cff2c24fe0b345711e7a21af02e8bcf5 (patch)
tree773b30106efb9b48055bc93958e5a94ac53768ce /net/tipc
parentf7b12606b5de323a2bb5ca1696558efde8f25441 (diff)
parent960dfc4eb23a28495276b02604d7458e0e1a1ed8 (diff)
downloadlinux-1e8d6421cff2c24fe0b345711e7a21af02e8bcf5.tar.gz
linux-1e8d6421cff2c24fe0b345711e7a21af02e8bcf5.tar.bz2
linux-1e8d6421cff2c24fe0b345711e7a21af02e8bcf5.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/bonding/bond_3ad.h drivers/net/bonding/bond_main.c Two minor conflicts in bonding, both of which were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/core.h1
-rw-r--r--net/tipc/link.c7
2 files changed, 8 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]))
diff --git a/net/tipc/link.c b/net/tipc/link.c
index e4f233d58d35..284d6383ad6c 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1408,6 +1408,12 @@ static int link_recv_buf_validate(struct sk_buff *buf)
u32 hdr_size;
u32 min_hdr_size;
+ /* If this packet comes from the defer queue, the skb has already
+ * been validated
+ */
+ if (unlikely(TIPC_SKB_CB(buf)->deferred))
+ return 1;
+
if (unlikely(buf->len < MIN_H_SIZE))
return 0;
@@ -1717,6 +1723,7 @@ static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
&l_ptr->newest_deferred_in, buf)) {
l_ptr->deferred_inqueue_sz++;
l_ptr->stats.deferred_recv++;
+ TIPC_SKB_CB(buf)->deferred = true;
if ((l_ptr->deferred_inqueue_sz % 16) == 1)
tipc_link_proto_xmit(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);
} else