ch: Enable bridge network mode

Tested with following interface config:

 <interface type='bridge'>
    <mac address='52:54:00:71:b9:b6'/>
    <source bridge='clhbr0'/>
    <model type='virtio'/>
 </interface>

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Praveen K Paladugu 2024-08-26 14:30:39 -05:00 committed by Michal Privoznik
parent 8a44f78625
commit d9be0beb4c

View File

@ -101,6 +101,7 @@ virCHConnetNetworkInterfaces(virCHDriver *driver,
if (virCHInterfaceUpdateNicindexes(net, nicindexes, nnicindexes) < 0)
return -1;
break;
case VIR_DOMAIN_NET_TYPE_BRIDGE:
case VIR_DOMAIN_NET_TYPE_NETWORK:
if (virDomainInterfaceBridgeConnect(vm, net,
tapfds,
@ -114,7 +115,6 @@ virCHConnetNetworkInterfaces(virCHDriver *driver,
if (virCHInterfaceUpdateNicindexes(net, nicindexes, nnicindexes) < 0)
return -1;
break;
case VIR_DOMAIN_NET_TYPE_BRIDGE:
case VIR_DOMAIN_NET_TYPE_DIRECT:
if (virCHInterfaceUpdateNicindexes(net, nicindexes, nnicindexes) < 0)
return -1;