]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
kernel: Fix regression for user-space STP in bridging code.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Nov 2011 09:35:07 +0000 (10:35 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Nov 2011 09:35:07 +0000 (10:35 +0100)
The patch was proposed to be included in IPFire by
Vitalii Demianets <vitas@nppfactor.kiev.ua>.

He says:
  Thank you for the logs. The problem is clear now.
  As I suspected the bridge interface red0 is not
  running (in NO-CARRIER, DOWN state).

  That's because of this patch:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=patch;h=1faa4356a3bd89ea11fb92752d897cff3a20ec0e
  which appeared in 2.6.39

  Stephen obviously did not take into account user-space stp when submitted this
  patch, because in the case of user-space stp bridge interface have no chance
  to call netif_carrier_on(), so it will always be down, as we see it.

  This regression was reverted by this patch:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=patch;h=b64b73d7d0c480f75684519c6134e79d50c1b341
  which appeared in 3.0.9.

kernel/kernel.nm
kernel/patches/linux-3.0-bridge-no-carrier.patch [new file with mode: 0644]

index 347a3f6234253f50db5993b99f2442ae8b1f1d46..c8b1b4517f1e5e491360337a70ecd11dde163f33 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = kernel
 version    = 3.0.4
-release    = 10
+release    = 11
 thisapp    = linux-%{version}
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
diff --git a/kernel/patches/linux-3.0-bridge-no-carrier.patch b/kernel/patches/linux-3.0-bridge-no-carrier.patch
new file mode 100644 (file)
index 0000000..42f2010
--- /dev/null
@@ -0,0 +1,44 @@
+From b64b73d7d0c480f75684519c6134e79d50c1b341 Mon Sep 17 00:00:00 2001
+From: stephen hemminger <shemminger@vyatta.com>
+Date: Mon, 3 Oct 2011 18:14:45 +0000
+Subject: [PATCH] bridge: leave carrier on for empty bridge
+
+This resolves a regression seen by some users of bridging.
+Some users use the bridge like a dummy device.
+They expect to be able to put an IPv6 address on the device
+with no ports attached. Although there are better ways of doing
+this, there is no reason to not allow it.
+
+Note: the bridge still will reflect the state of ports in the
+bridge if there are any added.
+
+Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ net/bridge/br_device.c |    3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
+index 32b8f9f..ff3ed60 100644
+--- a/net/bridge/br_device.c
++++ b/net/bridge/br_device.c
+@@ -91,7 +91,6 @@ static int br_dev_open(struct net_device *dev)
+ {
+       struct net_bridge *br = netdev_priv(dev);
+-      netif_carrier_off(dev);
+       netdev_update_features(dev);
+       netif_start_queue(dev);
+       br_stp_enable_bridge(br);
+@@ -108,8 +107,6 @@ static int br_dev_stop(struct net_device *dev)
+ {
+       struct net_bridge *br = netdev_priv(dev);
+-      netif_carrier_off(dev);
+-
+       br_stp_disable_bridge(br);
+       br_multicast_stop(br);
+-- 
+1.7.6.2
+