Skip to content

Commit

Permalink
vlan: Match underlying dev carrier on vlan add
Browse files Browse the repository at this point in the history
When adding a new vlan, if the underlying interface has no carrier,
then the newly added vlan interface should also have no carrier.
At present, this is not true - the newly added vlan is added with
carrier up.  Fix by checking state of real device.

Signed-off-by: Phil Oester <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Phil Oester authored and davem330 committed Aug 19, 2010
1 parent 0645bab commit 0ac820e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ static int vlan_dev_open(struct net_device *dev)
if (vlan->flags & VLAN_FLAG_GVRP)
vlan_gvrp_request_join(dev);

netif_carrier_on(dev);
if (netif_carrier_ok(real_dev))
netif_carrier_on(dev);
return 0;

clear_allmulti:
Expand Down

0 comments on commit 0ac820e

Please sign in to comment.