From: Michael Tremer Date: Mon, 14 Nov 2011 09:35:07 +0000 (+0100) Subject: kernel: Fix regression for user-space STP in bridging code. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fe3c5562443efdcad2e3e255ef84577574ff7f8;p=ipfire-3.x.git kernel: Fix regression for user-space STP in bridging code. The patch was proposed to be included in IPFire by Vitalii Demianets . 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. --- diff --git a/kernel/kernel.nm b/kernel/kernel.nm index 347a3f623..c8b1b4517 100644 --- a/kernel/kernel.nm +++ b/kernel/kernel.nm @@ -5,7 +5,7 @@ name = kernel version = 3.0.4 -release = 10 +release = 11 thisapp = linux-%{version} maintainer = Michael Tremer 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 index 000000000..42f201055 --- /dev/null +++ b/kernel/patches/linux-3.0-bridge-no-carrier.patch @@ -0,0 +1,44 @@ +From b64b73d7d0c480f75684519c6134e79d50c1b341 Mon Sep 17 00:00:00 2001 +From: stephen hemminger +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 +Signed-off-by: David S. Miller +--- + 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 +