From: Ben Pfaff Date: Thu, 23 Apr 2009 21:42:27 +0000 (-0700) Subject: vswitch: Fetch interface MAC when creating an interface in iface_create(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b98f70e4920c6582b3320fa618ae1c4aadfb6dd;p=openvswitch 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. --- 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; }