]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add fix for early vlan initialization, fwd gentoo via daniel drake
authorChris Wright <chrisw@osdl.org>
Sun, 31 Jul 2005 05:12:49 +0000 (22:12 -0700)
committerChris Wright <chrisw@osdl.org>
Sun, 31 Jul 2005 05:12:49 +0000 (22:12 -0700)
queue/early-vlan-fix.patch [new file with mode: 0644]
queue/series

diff --git a/queue/early-vlan-fix.patch b/queue/early-vlan-fix.patch
new file mode 100644 (file)
index 0000000..e6ac40c
--- /dev/null
@@ -0,0 +1,44 @@
+From stable-bounces@linux.kernel.org  Sat Jul 30 13:24:53 2005
+Date: Sat, 30 Jul 2005 21:25:10 +0100
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: tommy.christensen@tpack.net
+Subject: [PATCH][VLAN]: Fix early vlan adding leads to not functional device
+
+From: Tommy Christensen <tommy.christensen@tpack.net>
+X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f4637b55ba960d9987a836617271659e9b7b0de8
+
+[VLAN]: Fix early vlan adding leads to not functional device
+
+OK, I can see what's happening here. eth0 doesn't detect link-up until
+after a few seconds, so when the vlan interface is opened immediately
+after eth0 has been opened, it inherits the link-down state. Subsequently
+the vlan interface is never properly activated and are thus unable to
+transmit any packets.
+
+dev->state bits are not supposed to be manipulated directly. Something
+similar is probably needed for the netif_device_present() bit, although
+I don't know how this is meant to work for a virtual device.
+  
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+
+--- a/net/8021q/vlan.c
++++ b/net/8021q/vlan.c
+@@ -578,6 +578,14 @@ static int vlan_device_event(struct noti
+                       if (!vlandev)
+                               continue;
++                      if (netif_carrier_ok(dev)) {
++                              if (!netif_carrier_ok(vlandev))
++                                      netif_carrier_on(vlandev);
++                      } else {
++                              if (netif_carrier_ok(vlandev))
++                                      netif_carrier_off(vlandev);
++                      }
++
+                       if ((vlandev->state & VLAN_LINK_STATE_MASK) != flgs) {
+                               vlandev->state = (vlandev->state &~ VLAN_LINK_STATE_MASK) 
+                                       | flgs;
+
index 29c7d555b3f38ba38bcde777a7eea7ae31c96208..9fe9903c7bf92f0359697f173f75d186f778ce1f 100644 (file)
@@ -9,3 +9,4 @@ netfilter-ip_conntrack_untracked-refcount.patch
 ipsec-array-overflow.patch
 bio_clone-fix.patch
 sys_get_thread_area-leak.patch
+early-vlan-fix.patch