summaryrefslogtreecommitdiff
path: root/net/8021q
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-02-18 10:00:11 +0000
committerDavid S. Miller <davem@davemloft.net>2016-02-21 21:54:05 -0500
commite817af27e01f9294055a441d1034bbc353ee39d2 (patch)
tree7c209b4685df3ec5fbbf1f78c1f658c0e9927130 /net/8021q
parent80c804bfc487c6df783c258b9034b9d81c34f7a0 (diff)
downloadlwn-e817af27e01f9294055a441d1034bbc353ee39d2.tar.gz
lwn-e817af27e01f9294055a441d1034bbc353ee39d2.zip
vlan: turn on unicast filtering on vlan device
Currently vlan device inherits unicast filtering flag from underlying device. If underlying device doesn't support unicast filter, this will put vlan device into promiscuous mode when it's stacked. Tun on IFF_UNICAST_FLT on the vlan device in any case so that it does not go into promiscuous mode needlessly. If underlying device does not support unicast filtering, that device will enter promiscuous mode. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c1
-rw-r--r--net/8021q/vlan_dev.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index d2cd9de4b724..69929c05c843 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -261,7 +261,6 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
* hope the underlying device can handle it.
*/
new_dev->mtu = real_dev->mtu;
- new_dev->priv_flags |= (real_dev->priv_flags & IFF_UNICAST_FLT);
vlan = vlan_dev_priv(new_dev);
vlan->vlan_proto = htons(ETH_P_8021Q);
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index ad5e2fd1012c..055f0e989e90 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -799,6 +799,7 @@ void vlan_setup(struct net_device *dev)
ether_setup(dev);
dev->priv_flags |= IFF_802_1Q_VLAN | IFF_NO_QUEUE;
+ dev->priv_flags |= IFF_UNICAST_FLT;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
netif_keep_dst(dev);