netfilter: ipset: Fix serious failure in CIDR tracking
[firefly-linux-kernel-4.4.55.git] / net / core / dev.c
index faebb398fb46ad93a1d09b051f8662bcf203eaab..7ddbb31b10d3f47c164a18fc3e9f22ea9947b9ed 100644 (file)
@@ -3513,8 +3513,15 @@ ncls:
                }
        }
 
-       if (vlan_tx_nonzero_tag_present(skb))
-               skb->pkt_type = PACKET_OTHERHOST;
+       if (unlikely(vlan_tx_tag_present(skb))) {
+               if (vlan_tx_tag_get_id(skb))
+                       skb->pkt_type = PACKET_OTHERHOST;
+               /* Note: we might in the future use prio bits
+                * and set skb->priority like in vlan_do_receive()
+                * For the time being, just ignore Priority Code Point
+                */
+               skb->vlan_tci = 0;
+       }
 
        /* deliver only exact match when indicated */
        null_or_dev = deliver_exact ? skb->dev : NULL;