netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Toshiaki Makita <toshiaki.makita1@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
	"David S . Miller" <davem@davemloft.net>,
	Vlad Yasevich <vyasevic@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v3 net 2/9] bridge: Fix the way to insert new local fdb entries in br_fdb_changeaddr
Date: Sat, 08 Feb 2014 11:43:48 +0900	[thread overview]
Message-ID: <1391827428.1739.22.camel@localhost.localdomain> (raw)
In-Reply-To: <20140207093127.56f78187@samsung-9>

On Fri, 2014-02-07 at 09:31 -0700, Stephen Hemminger wrote:
> On Fri,  7 Feb 2014 16:48:19 +0900
> Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> wrote:
> 
> > Since commit bc9a25d21ef8 ("bridge: Add vlan support for local fdb entries"),
> > br_fdb_changeaddr() has inserted a new local fdb entry only if it can
> > find old one. But if we have two ports where they have the same address
> > or user has deleted a local entry, there will be no entry for one of the
> > ports.
> > 
> > Example of problematic case:
> >   ip link set eth0 address aa:bb:cc:dd:ee:ff
> >   ip link set eth1 address aa:bb:cc:dd:ee:ff
> >   brctl addif br0 eth0
> >   brctl addif br0 eth1 # eth1 will not have a local entry due to dup.
> 
> I think the second addif should fail, it doesn't seem valid to have
> two interfaces on same bridge with same address. Most hardware switches
> would disable the port in that case.

Thank you for your comment, but I don't think so for several reasons.

- From other network elements on the same network, bridge ports don't
appear to have a mac address, but the bridge appears to have several mac
addresses that can reach to the bridge. The duplicated address is simply
seen as one of those addresses. I don't think it is a problem.

- This operation (add a port that has duplicated address) has allowed
for several years, and it is obviously intended, as commented in
fdb_insert().

417                 /* it is okay to have multiple ports with same
418                  * address, just use the first one.
419                  */

- Hardware switches usually have one mac address per one switch. Their
ports don't have mac addresses. It is not reasonable to compare hardware
switches.

Thanks,
Toshiaki Makita

  reply	other threads:[~2014-02-08  2:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  7:48 [PATCH v3 net 0/9] bridge: Fix corner case problems around local fdb entries Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 1/9] bridge: Fix the way to find old local fdb entries in br_fdb_changeaddr Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 2/9] bridge: Fix the way to insert new " Toshiaki Makita
2014-02-07 16:31   ` Stephen Hemminger
2014-02-08  2:43     ` Toshiaki Makita [this message]
2014-02-07  7:48 ` [PATCH v3 net 3/9] bridge: Fix the way to find old local fdb entries in br_fdb_change_mac_address Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 4/9] bridge: Change local fdb entries whenever mac address of bridge device changes Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 5/9] bridge: Fix the way to check if a local fdb entry can be deleted Toshiaki Makita
2014-02-10 17:22   ` Vlad Yasevich
2014-02-07  7:48 ` [PATCH v3 net 6/9] bridge: Properly check if local fdb entry can be deleted in br_fdb_change_mac_address Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 7/9] bridge: Properly check if local fdb entry can be deleted in br_fdb_delete_by_port Toshiaki Makita
2014-02-10 17:37   ` Vlad Yasevich
2014-02-07  7:48 ` [PATCH v3 net 8/9] bridge: Properly check if local fdb entry can be deleted when deleting vlan Toshiaki Makita
2014-02-07  7:48 ` [PATCH v3 net 9/9] bridge: Prevent possible race condition in br_fdb_change_mac_address Toshiaki Makita
2014-02-10 22:36 ` [PATCH v3 net 0/9] bridge: Fix corner case problems around local fdb entries 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=1391827428.1739.22.camel@localhost.localdomain \
    --to=toshiaki.makita1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vyasevic@redhat.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).