From 8cc013b20f730d394b89748b4b5fae27821ed908 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 6 Aug 2009 10:33:26 -0700 Subject: [PATCH] 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. --- vswitchd/bridge.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index a4a723ad5..0d2ca89aa 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, -- 2.43.0