aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 67b6210a589a..bd44e28c735e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2570,11 +2570,14 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
2570 if (gso_segs > dev->gso_max_segs || gso_segs < dev->gso_min_segs) 2570 if (gso_segs > dev->gso_max_segs || gso_segs < dev->gso_min_segs)
2571 features &= ~NETIF_F_GSO_MASK; 2571 features &= ~NETIF_F_GSO_MASK;
2572 2572
2573 if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) { 2573 if (!vlan_tx_tag_present(skb)) {
2574 struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; 2574 if (unlikely(protocol == htons(ETH_P_8021Q) ||
2575 protocol = veh->h_vlan_encapsulated_proto; 2575 protocol == htons(ETH_P_8021AD))) {
2576 } else if (!vlan_tx_tag_present(skb)) { 2576 struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
2577 return harmonize_features(skb, features); 2577 protocol = veh->h_vlan_encapsulated_proto;
2578 } else {
2579 return harmonize_features(skb, features);
2580 }
2578 } 2581 }
2579 2582
2580 features = netdev_intersect_features(features, 2583 features = netdev_intersect_features(features,