]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan.
authorJesse Gross <jesse@nicira.com>
Mon, 17 Jan 2011 20:46:00 +0000 (20:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jan 2011 00:13:50 +0000 (16:13 -0800)
In netif_skb_features() we return only the features that are valid for vlans
if we have a vlan packet.  However, we should not mask out NETIF_F_HW_VLAN_TX
since it enables transmission of vlan tags and is obviously valid.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 83507c265e480298be889c84d5e89be1351cdcfe..4c58d11d3b68b79f1d981473d31bb474b43b290e 100644 (file)
@@ -2023,13 +2023,13 @@ int netif_skb_features(struct sk_buff *skb)
                return harmonize_features(skb, protocol, features);
        }
 
-       features &= skb->dev->vlan_features;
+       features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
 
        if (protocol != htons(ETH_P_8021Q)) {
                return harmonize_features(skb, protocol, features);
        } else {
                features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
-                               NETIF_F_GEN_CSUM;
+                               NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_TX;
                return harmonize_features(skb, protocol, features);
        }
 }