aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-06-19 19:22:28 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-19 19:22:28 -0400
commit4497b0763cb1afae463f5e144c28b5d806e28b60 (patch)
tree3e86c53b5eb461eac7523885e43f36033cc03968 /net/core/skbuff.c
parent0187bdfb05674147774ca79a79942537f3ad54bd (diff)
net: Discard and warn about LRO'd skbs received for forwarding
Add skb_warn_if_lro() to test whether an skb was received with LRO and warn if so. Change br_forward(), ip_forward() and ip6_forward() to call it) and discard the skb if it returns true. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3e18f8525e82..2df012be973d 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2583,6 +2583,13 @@ bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off)
2583 return true; 2583 return true;
2584} 2584}
2585 2585
2586void __skb_warn_lro_forwarding(const struct sk_buff *skb)
2587{
2588 if (net_ratelimit())
2589 pr_warning("%s: received packets cannot be forwarded"
2590 " while LRO is enabled\n", skb->dev->name);
2591}
2592
2586EXPORT_SYMBOL(___pskb_trim); 2593EXPORT_SYMBOL(___pskb_trim);
2587EXPORT_SYMBOL(__kfree_skb); 2594EXPORT_SYMBOL(__kfree_skb);
2588EXPORT_SYMBOL(kfree_skb); 2595EXPORT_SYMBOL(kfree_skb);
@@ -2616,6 +2623,7 @@ EXPORT_SYMBOL(skb_seq_read);
2616EXPORT_SYMBOL(skb_abort_seq_read); 2623EXPORT_SYMBOL(skb_abort_seq_read);
2617EXPORT_SYMBOL(skb_find_text); 2624EXPORT_SYMBOL(skb_find_text);
2618EXPORT_SYMBOL(skb_append_datato_frags); 2625EXPORT_SYMBOL(skb_append_datato_frags);
2626EXPORT_SYMBOL(__skb_warn_lro_forwarding);
2619 2627
2620EXPORT_SYMBOL_GPL(skb_to_sgvec); 2628EXPORT_SYMBOL_GPL(skb_to_sgvec);
2621EXPORT_SYMBOL_GPL(skb_cow_data); 2629EXPORT_SYMBOL_GPL(skb_cow_data);