From: Ben Pfaff Date: Thu, 6 Aug 2009 17:33:26 +0000 (-0700) Subject: vswitchd: Fix logged warnings for new internal ports. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cc013b20f730d394b89748b4b5fae27821ed908;p=openvswitch vswitchd: Fix logged warnings for new internal ports. Justin reported that adding an internal port to a bridge caused ovs-vswitchd to log a pair of warnings. This commit suppresses those warnings, which were harmless. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index a4a723ad..0d2ca89a 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -3009,8 +3009,17 @@ iface_create(struct port *port, const char *name) iface->tag = tag_create_random(); iface->delay_expires = LLONG_MAX; - netdev_nodev_get_etheraddr(name, iface->mac); - netdev_nodev_get_carrier(name, &iface->enabled); + if (!cfg_get_bool(0, "iface.%s.internal", iface->name)) { + netdev_nodev_get_etheraddr(name, iface->mac); + netdev_nodev_get_carrier(name, &iface->enabled); + } else { + /* Internal interfaces are created later by the call to dpif_port_add() + * in bridge_reconfigure(). Until then, we can't obtain any + * information about them. (There's no real value in doing so, anyway, + * because the 'mac' and 'enabled' values are only used for interfaces + * that are bond slaves, and it doesn't normally make sense to bond an + * internal interface.) */ + } if (port->n_ifaces >= port->allocated_ifaces) { port->ifaces = x2nrealloc(port->ifaces, &port->allocated_ifaces,