From: David Miller <davem@davemloft.net>
To: sanagi.koki@jp.fujitsu.com
Cc: shemminger@linux-foundation.org,
bridge@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: Re: [PATCH] bridge: Cannot communicate with brX when its MAC address is changed
Date: Wed, 30 Nov 2011 23:02:18 -0500 (EST) [thread overview]
Message-ID: <20111130.230218.710206942884045715.davem@davemloft.net> (raw)
In-Reply-To: <4ED5E9D6.3070404@jp.fujitsu.com>
From: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
Date: Wed, 30 Nov 2011 17:31:18 +0900
> When the MAC address of a bridge interface is changed, it cannot communicate
> with others. Because Whether or not a packet should be transferred to bridge
> interface depends on whether or not dst of a packet is in fdb and is_local=y.
> If we change MAC address of a bridge interface, it isn't in fdb.
>
> This patch adds an condition that dst of a packet matches MAC address of
> a bridge interface to the conventional condition.
>
> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
This looks like a patch I've seen before, and in any event it makes
more sense to update the FDB when the MAC changes instead of adding a
special bypass rule.
Stephen?
> ---
> net/bridge/br_input.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index 5a31731..4e5c862 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -94,7 +94,8 @@ 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 ((dst = __br_fdb_get(br, dest) && dst->is_local) ||
> + !compare_ether_addr(p->br->dev->dev_addr, dest)) {
> skb2 = skb;
> /* Do not forward the packet since it's local. */
> skb = NULL;
next prev parent reply other threads:[~2011-12-01 4:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:31 [PATCH] bridge: Cannot communicate with brX when its MAC address is changed Koki Sanagi
2011-12-01 4:02 ` David Miller [this message]
2011-12-01 17:21 ` Stephen Hemminger
2011-12-01 18:02 ` David Miller
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=20111130.230218.710206942884045715.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bridge@lists.linux-foundation.org \
--cc=netdev@vger.kernel.org \
--cc=sanagi.koki@jp.fujitsu.com \
--cc=shemminger@linux-foundation.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).