Re-introduce macvlan / ipvlan selection when bridge is enabled

This commit is contained in:
bergware
2023-08-10 03:26:04 +02:00
parent 5e6f8656ac
commit 180c4c2e91
5 changed files with 45 additions and 12 deletions

View File

@@ -661,7 +661,7 @@
$netmodel = $nic['model'] ?: 'virtio-net';
$net_res =$this->libvirt_get_net_res($this->conn, $nic['network']);
$vhost = file_exists("/boot/config/network.cfg") && exec("grep -Po '^BRNICS\\[0\\]=\"\\K[^\"]+' /boot/config/network.cfg")=='';
$vhost = !file_exists('/sys/class/net/br0');
if ($vhost) {
exec("ip -br a|grep -Po '^vhost[0-9][^@]*'",$br);
} else {