bridge: accept bridge own MAC address as local
if MAC address of bridge is manually set (BR_SET_MAC_ADDR). Otherwise
only MAC addresses of bridge members will work if manually set.
Signed-off-by: Ulrich Weber <redacted>
---
net/bridge/br_input.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
@@ -93,7 +93,9 @@ int br_handle_frame_finish(struct sk_buff *skb)skb2=skb;br->dev->stats.multicast++;-}elseif((dst=__br_fdb_get(br,dest))&&dst->is_local){+}elseif((br->flags&BR_SET_MAC_ADDR&&+!compare_ether_addr(br->bridge_id.addr,dest))||+((dst=__br_fdb_get(br,dest))&&dst->is_local)){skb2=skb;/* Do not forward the packet since it's local. */skb=NULL;
From: Stephen Hemminger <hidden> Date: 2011-08-12 16:19:05
On Fri, 12 Aug 2011 13:30:24 +0200
Ulrich Weber [off-list ref] wrote:
quoted hunk
bridge: accept bridge own MAC address as local
if MAC address of bridge is manually set (BR_SET_MAC_ADDR). Otherwise
only MAC addresses of bridge members will work if manually set.
Signed-off-by: Ulrich Weber <redacted>
---
net/bridge/br_input.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
@@ -93,7 +93,9 @@ int br_handle_frame_finish(struct sk_buff *skb)skb2=skb;br->dev->stats.multicast++;-}elseif((dst=__br_fdb_get(br,dest))&&dst->is_local){+}elseif((br->flags&BR_SET_MAC_ADDR&&+!compare_ether_addr(br->bridge_id.addr,dest))||+((dst=__br_fdb_get(br,dest))&&dst->is_local)){skb2=skb;/* Do not forward the packet since it's local. */skb=NULL;
A cleaner way to do this would be better to put a local entry
in the forwarding database when mac address is manually set.
Then there would not be special case code.
A cleaner way to do this would be better to put a local entry
in the forwarding database when mac address is manually set.
Then there would not be special case code.
I agree, would be nicer to have it in the forwarding db.
However to which bridge port should i attach this entry?
Seems to be wrong for me to have it attached to a not
related port...
The intention of this patch is to set the bridge MAC to any
address, not related to an bridge port interface.
Cheers
Ulrich
--
Ulrich Weber | ulrich.weber@sophos.com | Senior Software Engineer
Astaro - a Sophos company | Amalienbadstr 41 | 76227 Karlsruhe | Germany
Phone +49-721-25516-0 | Fax –200 | www.astaro.com
bridge: accept bridge own MAC address as local
if MAC address of bridge is manually set (BR_SET_MAC_ADDR). Otherwise
only MAC addresses of bridge members will work if manually set.
Signed-off-by: Ulrich Weber <redacted>
As Stephen mentioned, the real bug is that we don't create a local
FDB entry (and get rid of the old one) when the MAC address changes.
bridge: accept bridge own MAC address as local
if MAC address of bridge is manually set (BR_SET_MAC_ADDR). Otherwise
only MAC addresses of bridge members will work if manually set.
Signed-off-by: Ulrich Weber <redacted>
As Stephen mentioned, the real bug is that we don't create a local
FDB entry (and get rid of the old one) when the MAC address changes.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Another alternative is going back to restricting the mac address of
the bridge to be the same as one of the existing ports. This was how
it used to be, but some people wanted to set arbitrary addresses
(probably to deal with start up ordering issues).