virDomainNetGetActualVirtPortProfile(iface),
virDomainNetGetActualVlan(iface),
virDomainNetGetActualPortOptionsIsolated(iface),
- iface->mtu, NULL));
+ iface->mtu, NULL, false));
}
}
* @virtVlan: vlan tag info
* @mtu: requested MTU for port (or 0 for "default")
* @actualMTU: MTU actually set for port (after accounting for bridge's MTU)
+ * @force: set true to force detach/reattach even if the bridge name is unchanged
+ * (this can be useful if, for example, the profileid of the
+ * <virtualport> changes)
*
* Ensures that the tap device (@tapname) is connected to the bridge
* (@brname), potentially removing it from any existing bridge that
const virNetDevVlan *virtVlan,
virTristateBool isolatedPort,
unsigned int mtu,
- unsigned int *actualMTU)
+ unsigned int *actualMTU,
+ bool force)
{
bool useOVS = false;
g_autofree char *master = NULL;
}
/* Nothing more todo if we're on the right bridge already */
- if (STREQ_NULLABLE(brname, master))
+ if (STREQ_NULLABLE(brname, master) && !force)
return 0;
/* disconnect from current (incorrect) bridge, if any */
const virNetDevVlan *virtVlan,
virTristateBool isolatedPort,
unsigned int mtu,
- unsigned int *actualMTU)
+ unsigned int *actualMTU,
+ bool force)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
G_GNUC_WARN_UNUSED_RESULT;