On 1/8/25 8:31 AM, Leigh Brown wrote:
Adjust domain and network validation to permit standard linux
bridges
to allow vlan configuration.
Update calls to virNetDevBridgeAddPort to pass the vlan configuration.
Signed-off-by: Leigh Brown <leigh(a)solinno.co.uk>
Reviewed-by: Laine Stump <laine(a)redhat.com>
---
src/conf/domain_validate.c | 3 ++-
src/lxc/lxc_process.c | 2 +-
src/network/bridge_driver.c | 13 ++++++++-----
src/util/virnetdevtap.c | 2 +-
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 1034bb57f5..61c83e25de 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -2077,7 +2077,8 @@ virDomainActualNetDefValidate(const virDomainNetDef *net)
(actualType == VIR_DOMAIN_NET_TYPE_DIRECT &&
virDomainNetGetActualDirectMode(net) ==
VIR_NETDEV_MACVLAN_MODE_PASSTHRU) ||
(actualType == VIR_DOMAIN_NET_TYPE_BRIDGE &&
- vport && vport->virtPortType ==
VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH))) {
+ vport && vport->virtPortType ==
VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) ||
+ (!vport && actualType == VIR_DOMAIN_NET_TYPE_BRIDGE))) {
After you went to the trouble to change the line above in the manner I
had suggested (putting !vport before the actualType comparison instead
of after), I realized during my final check that I'd read the entire
condition wrong, and the original order is more consistent with the rest
of the expression, so I switched it back before pushing.