[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device Upstream commit 0ed21b321a13421e2dfeaa70a6c324e05e3e91e6: Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity or dev_change_flags. Setting it directly causes two unwanted effects: - the next dev_change_flags call will notice a difference between dev->gflags and the actual flags, enable promisc/allmulti mode and incorrectly update dev->gflags - this keeps the underlying device in promisc/allmulti mode until the VLAN device is deleted Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- commit da2c2dd3bbd2e57ebf6ce9a404ede39a3103d4bd tree 86c0ea5efb73fada291d7ed70897afd5b6234c7b parent 4eed9fb2564cf763918b9711558169e06dbfb8d5 author Patrick McHardy Sun, 13 Apr 2008 08:06:00 +0200 committer Patrick McHardy Sun, 13 Apr 2008 08:06:00 +0200 net/8021q/vlan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 032bf44..156ad38 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -326,7 +326,7 @@ static int vlan_dev_init(struct net_device *dev) int subclass = 0; /* IFF_BROADCAST|IFF_MULTICAST; ??? */ - dev->flags = real_dev->flags & ~IFF_UP; + dev->flags = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI); dev->iflink = real_dev->ifindex; dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))) |