From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org,
berrange@redhat.com, jeff@garzik.org,
herbert@gondor.apana.org.au, rjw@sisk.pl
Subject: [PATCH] bridge: assign random address
Date: Tue, 11 Dec 2007 15:48:35 -0800 [thread overview]
Message-ID: <20071211154835.75ace6bc@freepuppy.rosehill> (raw)
In-Reply-To: <20071211145921.11094ab8.akpm@linux-foundation.org>
Assigning a valid random address to bridge device solves problems
when bridge device is brought up before adding real device to bridge.
When the first real device is added to the bridge, it's address
will overide the bridges random address.
Note: any device added to a bridge must already have a valid
ethernet address.
br_add_if -> br_fdb_insert -> fdb_insert -> is_valid_ether_addr
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
--- a/net/bridge/br_device.c 2007-10-16 16:48:21.000000000 -0700
+++ b/net/bridge/br_device.c 2007-12-11 15:36:52.000000000 -0800
@@ -157,8 +157,7 @@ static struct ethtool_ops br_ethtool_ops
void br_dev_setup(struct net_device *dev)
{
- memset(dev->dev_addr, 0, ETH_ALEN);
-
+ random_ether_addr(dev->dev_addr);
ether_setup(dev);
dev->do_ioctl = br_dev_ioctl;
next prev parent reply other threads:[~2007-12-11 23:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-9545-10286@http.bugzilla.kernel.org/>
2007-12-11 21:26 ` [Bugme-new] [Bug 9545] New: Cannot bring up a bridge interface without a MAC address set Andrew Morton
2007-12-11 22:52 ` Stephen Hemminger
2007-12-11 22:59 ` Andrew Morton
2007-12-11 23:48 ` Stephen Hemminger [this message]
2007-12-12 0:02 ` [PATCH] bridge: assign random address Andrew Morton
2007-12-16 21:37 ` David Miller
2007-12-16 22:29 ` Andrew Morton
2007-12-16 23:26 ` David Miller
2007-12-16 23:34 ` Andrew Morton
2007-12-16 23:40 ` David Miller
2007-12-16 23:46 ` Andrew Morton
2007-12-16 23:37 ` Randy Dunlap
2007-12-17 1:46 ` Jeff Garzik
2007-12-17 2:55 ` Andrew Morton
2007-12-17 4:36 ` David Miller
2007-12-17 4:24 ` David Miller
2007-12-18 1:09 ` Jeff Garzik
2007-12-17 16:56 ` Stephen Hemminger
2007-12-12 1:51 ` [Bugme-new] [Bug 9545] New: Cannot bring up a bridge interface without a MAC address set Herbert Xu
2007-12-12 5:36 ` 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=20071211154835.75ace6bc@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=berrange@redhat.com \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=rjw@sisk.pl \
/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).