Skip to content

Commit

Permalink
[BRIDGE]: Assign random address.
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Dec 16, 2007
1 parent f33e1d9 commit 3ae4125
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3ae4125

Please sign in to comment.