diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 660dd41aaaa6..1dad6c0926f2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1648,10 +1648,10 @@ EXPORT_SYMBOL(netif_device_attach); | |||
1648 | 1648 | ||
1649 | static bool can_checksum_protocol(unsigned long features, __be16 protocol) | 1649 | static bool can_checksum_protocol(unsigned long features, __be16 protocol) |
1650 | { | 1650 | { |
1651 | return ((features & NETIF_F_GEN_CSUM) || | 1651 | return ((features & NETIF_F_NO_CSUM) || |
1652 | ((features & NETIF_F_IP_CSUM) && | 1652 | ((features & NETIF_F_V4_CSUM) && |
1653 | protocol == htons(ETH_P_IP)) || | 1653 | protocol == htons(ETH_P_IP)) || |
1654 | ((features & NETIF_F_IPV6_CSUM) && | 1654 | ((features & NETIF_F_V6_CSUM) && |
1655 | protocol == htons(ETH_P_IPV6)) || | 1655 | protocol == htons(ETH_P_IPV6)) || |
1656 | ((features & NETIF_F_FCOE_CRC) && | 1656 | ((features & NETIF_F_FCOE_CRC) && |
1657 | protocol == htons(ETH_P_FCOE))); | 1657 | protocol == htons(ETH_P_FCOE))); |
@@ -2891,6 +2891,15 @@ static int __netif_receive_skb(struct sk_buff *skb) | |||
2891 | ncls: | 2891 | ncls: |
2892 | #endif | 2892 | #endif |
2893 | 2893 | ||
2894 | /* If we got this far with a hardware accelerated VLAN tag, it means | ||
2895 | * that we were put in promiscuous mode but nobody is interested in | ||
2896 | * this vid. Drop the packet now to prevent it from getting propagated | ||
2897 | * to other parts of the stack that won't know how to deal with packets | ||
2898 | * tagged in this manner. | ||
2899 | */ | ||
2900 | if (unlikely(vlan_tx_tag_present(skb))) | ||
2901 | goto bypass; | ||
2902 | |||
2894 | /* Handle special case of bridge or macvlan */ | 2903 | /* Handle special case of bridge or macvlan */ |
2895 | rx_handler = rcu_dereference(skb->dev->rx_handler); | 2904 | rx_handler = rcu_dereference(skb->dev->rx_handler); |
2896 | if (rx_handler) { | 2905 | if (rx_handler) { |
@@ -2927,6 +2936,7 @@ ncls: | |||
2927 | } | 2936 | } |
2928 | } | 2937 | } |
2929 | 2938 | ||
2939 | bypass: | ||
2930 | if (pt_prev) { | 2940 | if (pt_prev) { |
2931 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); | 2941 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); |
2932 | } else { | 2942 | } else { |