From: Stephen Hemminger <shemminger@vyatta.com>
To: Ulrich Weber <ulrich.weber@sophos.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: bridge: accept bridge own MAC address as local
Date: Fri, 12 Aug 2011 09:19:09 -0700 [thread overview]
Message-ID: <20110812091909.712fa36e@nehalam.ftrdhcpuser.net> (raw)
In-Reply-To: <20110812113024.GA8900@babylon>
On Fri, 12 Aug 2011 13:30:24 +0200
Ulrich Weber <ulrich.weber@sophos.com> wrote:
> 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;
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.
next prev parent reply other threads:[~2011-08-12 16:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 11:30 bridge: accept bridge own MAC address as local Ulrich Weber
2011-08-12 16:19 ` Stephen Hemminger [this message]
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=20110812091909.712fa36e@nehalam.ftrdhcpuser.net \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ulrich.weber@sophos.com \
/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).