aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2010-08-17 14:45:08 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-19 03:26:46 -0400
commit0ac820eebe9008094040955d294ef7b33b418413 (patch)
tree5ce37697c91666fd5c83930c32cf8181dc7e67c7 /net
parent0645bab7da3cb021157e5c661ef35f1d1226785a (diff)
vlan: Match underlying dev carrier on vlan add
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 <kernel@linuxace.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 3d59c9bf8feb..3bccdd12a264 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -510,7 +510,8 @@ static int vlan_dev_open(struct net_device *dev)
510 if (vlan->flags & VLAN_FLAG_GVRP) 510 if (vlan->flags & VLAN_FLAG_GVRP)
511 vlan_gvrp_request_join(dev); 511 vlan_gvrp_request_join(dev);
512 512
513 netif_carrier_on(dev); 513 if (netif_carrier_ok(real_dev))
514 netif_carrier_on(dev);
514 return 0; 515 return 0;
515 516
516clear_allmulti: 517clear_allmulti: