netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Weber <ulrich.weber@sophos.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: bridge: accept bridge own MAC address as local
Date: Fri, 12 Aug 2011 13:30:24 +0200	[thread overview]
Message-ID: <20110812113024.GA8900@babylon> (raw)

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 <ulrich.weber@sophos.com>
---
 net/bridge/br_input.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index f06ee39..3adabe3 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -93,7 +93,9 @@ int br_handle_frame_finish(struct sk_buff *skb)
 			skb2 = skb;
 
 		br->dev->stats.multicast++;
-	} else if ((dst = __br_fdb_get(br, dest)) && dst->is_local) {
+	} else if ((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;
-- 
1.7.4.1


             reply	other threads:[~2011-08-12 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 11:30 Ulrich Weber [this message]
2011-08-12 16:19 ` bridge: accept bridge own MAC address as local Stephen Hemminger
2011-08-12 16:36   ` Ulrich Weber
2011-08-26 16:29 ` David Miller
2011-08-26 16:42   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110812113024.GA8900@babylon \
    --to=ulrich.weber@sophos.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).