aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/br_forward.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 2bd11ec6d166..ee64287f1290 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -41,17 +41,13 @@ static inline unsigned packet_length(const struct sk_buff *skb)
41 41
42int br_dev_queue_push_xmit(struct sk_buff *skb) 42int br_dev_queue_push_xmit(struct sk_buff *skb)
43{ 43{
44 /* drop mtu oversized packets except gso */ 44 /* ip_fragment doesn't copy the MAC header */
45 if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) 45 if (nf_bridge_maybe_copy_header(skb) ||
46 (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))) {
46 kfree_skb(skb); 47 kfree_skb(skb);
47 else { 48 } else {
48 /* ip_fragment doesn't copy the MAC header */ 49 skb_push(skb, ETH_HLEN);
49 if (nf_bridge_maybe_copy_header(skb)) 50 dev_queue_xmit(skb);
50 kfree_skb(skb);
51 else {
52 skb_push(skb, ETH_HLEN);
53 dev_queue_xmit(skb);
54 }
55 } 51 }
56 52
57 return 0; 53 return 0;