There is a race between brcompatd and vswitchd for internal ports, e.g.
in this scenario:
1. cfg-mod adds "bridge.xenbr0.port=xenbr0".
2. vswitchd creates xenbr0.
we can have brcompatd slip in between them:
2.5. brcompatd notices that there is no network device xenbr0
and deletes the new line from the config file.
For the local port and other internal ports we don't want brcompatd
interfering, so this commit makes it ignore them.
Bug #1314.
const char *iface_name = ifaces.names[j];
enum netdev_flags flags;
+ /* The local port and internal ports are created and destroyed by
+ * vswitchd itself, so don't bother checking for them at all. In
+ * practice, they might not exist if vswitchd hasn't finished
+ * reloading since the configuration file was updated. */
+ if (!strcmp(iface_name, br_name)
+ || cfg_get_bool(0, "iface.%s.internal", if_name)) {
+ continue;
+ }
+
error = netdev_nodev_get_flags(iface_name, &flags);
if (error == ENODEV) {
VLOG_DBG_RL(&rl, "removing dead interface %s from %s",