net: init_vlan should not copy slave or master flags
authorJohn Fastabend <john.r.fastabend@intel.com>
Wed, 12 May 2010 21:31:06 +0000 (21:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2010 10:35:18 +0000 (03:35 -0700)
The vlan device should not copy the slave or master flags from
the real device. It is not in the bond until added nor is it
a master.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan_dev.c

index 55be90826f5fd1317f961b9fbabb3f3b989f380e..52984267781782cd78aa0bd7bc3d38280745c1b1 100644 (file)
@@ -708,7 +708,8 @@ static int vlan_dev_init(struct net_device *dev)
        netif_carrier_off(dev);
 
        /* IFF_BROADCAST|IFF_MULTICAST; ??? */
-       dev->flags  = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI);
+       dev->flags  = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI |
+                                         IFF_MASTER | IFF_SLAVE);
        dev->iflink = real_dev->ifindex;
        dev->state  = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
                                          (1<<__LINK_STATE_DORMANT))) |