From 9b98f70e4920c6582b3320fa618ae1c4aadfb6dd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 23 Apr 2009 14:42:27 -0700 Subject: [PATCH] vswitch: Fetch interface MAC when creating an interface in iface_create(). iface_create() creates an interface but failed to initialize its MAC address. (Fortunately, this was only used by STP, which has not been known to be tested recently anyhow.) This is also needed for /proc/net/bonding and /proc/net/vlan, hence fixing the bug now. --- vswitchd/bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index dc51e20e..f59c58db 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2041,6 +2041,8 @@ iface_create(struct port *port, const char *name) iface->enabled = true; iface->delay_expires = LLONG_MAX; + netdev_nodev_get_etheraddr(name, iface->mac); + if (!netdev_nodev_get_flags(name, &flags)) { iface->enabled = (flags & NETDEV_UP) != 0; } -- 2.30.2