lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150220100046.GB2008@nanopsycho.orion>
Date:	Fri, 20 Feb 2015 11:00:46 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	Scott Feldman <sfeldma@...il.com>
Cc:	Florian Fainelli <f.fainelli@...il.com>,
	netdev <netdev@...r.kernel.org>,
	Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: Port STP state after removing port from bridge

Fri, Feb 20, 2015 at 05:45:01AM CET, sfeldma@...il.com wrote:
>On Wed, Feb 18, 2015 at 11:39 PM, Florian Fainelli <f.fainelli@...il.com>
>wrote:
>
>> Hi,
>>
>> It just occured to me that the following sequence:
>>
>> brctl addbr br0
>> brctl addif br0 port0
>> ... STP happens
>> brctl delif br0 port0
>>
>> will leave port0 in STP disabled state, because the bridge code will
>> set the STP state to DISABLED, and only a down/up sequence can bring
>> it back to FORWARDING.
>>
>> Is this something that we should somehow fix? As an user it seems a
>> little convoluted having to do a down/up sequence to restore things. I
>> believe however that it is valid for the bridge layer to mark a port
>> as DISABLED when removing it. This is typically not noticed or even
>> remotely a problem with software bridges because we cannot enforce an
>> actual STP state at the HW level.
>>
>> Let me know your thoughts.
>>
>>
>​The fix in rocker would be:
>
>diff --git a/drivers/net/ethernet/rocker/rocker.c
>b/drivers/net/ethernet/rocker/rocker.c
>index 34389b6a..e2004fb 100644
>--- a/drivers/net/ethernet/rocker/rocker.c
>+++ b/drivers/net/ethernet/rocker/rocker.c
>@@ -4456,8 +4456,10 @@ static int rocker_port_bridge_leave(struct
>rocker_port *rocker_port)
>                rocker_port_internal_vlan_id_get(rocker_port,
>                                                 rocker_port->dev->ifindex);
>        err = rocker_port_vlan(rocker_port, 0, 0);
>+       if (err)
>+               return err;
>
>-       return err;
>+       return rocker_port_stp_update(rocker_port, BR_STATE_FORWARDING);
> }
>
>
>​This will return the port back to it's initial state of
>BR_STATE_FORWARDING, after it's removed from the bridge.
>
>I'll include this patch in the rocker pile to be pushed later.
>
>-scott​


I'm not sure, but wouldn't it be nicer it the bridge code would set
state to disabled before the port is removed from the bridge? 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ