netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [VLAN]: Don't synchronize addresses while the vlan device is down
@ 2007-11-08 17:19 Patrick McHardy
  2007-11-11  5:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2007-11-08 17:19 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1064 bytes --]

[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 <buc@odusz.so-cdu.ru>

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit f6d0e3b654d36bd87016b0626464990f3fc57ca7
tree 16ce232acdd1919e7ca42dc12b24f09f8d92f966
parent dbeeb816e805091e7cfc03baf36dc40b4adb2bbd
author Patrick McHardy <kaber@trash.net> Thu, 08 Nov 2007 17:34:43 +0100
committer Patrick McHardy <kaber@trash.net> 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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-11  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-08 17:19 [VLAN]: Don't synchronize addresses while the vlan device is down Patrick McHardy
2007-11-11  5:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).