提交 0ac820ee 编写于 作者: P Phil Oester 提交者: David S. Miller

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: NPhil Oester <kernel@linuxace.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0645bab7
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册