diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan_core.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 8a15eaadc4bd..4a78c4de9f20 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -9,7 +9,7 @@ bool vlan_do_receive(struct sk_buff **skbp) | |||
9 | { | 9 | { |
10 | struct sk_buff *skb = *skbp; | 10 | struct sk_buff *skb = *skbp; |
11 | __be16 vlan_proto = skb->vlan_proto; | 11 | __be16 vlan_proto = skb->vlan_proto; |
12 | u16 vlan_id = skb->vlan_tci & VLAN_VID_MASK; | 12 | u16 vlan_id = vlan_tx_tag_get_id(skb); |
13 | struct net_device *vlan_dev; | 13 | struct net_device *vlan_dev; |
14 | struct vlan_pcpu_stats *rx_stats; | 14 | struct vlan_pcpu_stats *rx_stats; |
15 | 15 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index a3d8d44cb7f4..26755dd40daa 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3580,8 +3580,15 @@ ncls: | |||
3580 | } | 3580 | } |
3581 | } | 3581 | } |
3582 | 3582 | ||
3583 | if (vlan_tx_nonzero_tag_present(skb)) | 3583 | if (unlikely(vlan_tx_tag_present(skb))) { |
3584 | skb->pkt_type = PACKET_OTHERHOST; | 3584 | if (vlan_tx_tag_get_id(skb)) |
3585 | skb->pkt_type = PACKET_OTHERHOST; | ||
3586 | /* Note: we might in the future use prio bits | ||
3587 | * and set skb->priority like in vlan_do_receive() | ||
3588 | * For the time being, just ignore Priority Code Point | ||
3589 | */ | ||
3590 | skb->vlan_tci = 0; | ||
3591 | } | ||
3585 | 3592 | ||
3586 | /* deliver only exact match when indicated */ | 3593 | /* deliver only exact match when indicated */ |
3587 | null_or_dev = deliver_exact ? skb->dev : NULL; | 3594 | null_or_dev = deliver_exact ? skb->dev : NULL; |