Subject: [VLAN]: Don't synchronize addresses while the vlan device is down

From: Patrick McHardy <[email-masked]>
Date: Thu, 08 Nov 2007 18:19:53 +0100

[VLAN]: Don't synchronize addresses while the vlan device is down

While the VLAN device is down, the unicast addresses are not configured
on the underlying device, so we shouldn't attempt to sync them.

Noticed by Dmitry Butskoy <[email-masked]>

Signed-off-by: Patrick McHardy <[email-masked]>

---
commit f6d0e3b654d36bd87016b0626464990f3fc57ca7
tree 16ce232acdd1919e7ca42dc12b24f09f8d92f966
parent dbeeb816e805091e7cfc03baf36dc40b4adb2bbd
author Patrick McHardy <[email-masked]> Thu, 08 Nov 2007 17:34:43 +0100
committer Patrick McHardy <[email-masked]> Thu, 08 Nov 2007 17:34:43 +0100

 net/8021q/vlan.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3fe4fc8..d80afec 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -636,6 +636,10 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 			if (!vlandev)
 				continue;
 
+			flgs = vlandev->flags;
+			if (!(flgs & IFF_UP))
+				continue;
+
 			vlan_sync_address(dev, vlandev);
 		}
 		break;