]> git.proxmox.com Git - qemu-server.git/commitdiff
fixup an sdn call outside the have_sdn guard
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 21 Nov 2023 12:25:51 +0000 (13:25 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 21 Nov 2023 12:25:51 +0000 (13:25 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/QemuServer.pm

index 0d738cd18703961893cc2eb6b02723987b5c83ce..3028e7097aadcf3b40bd2e93e6d36b54dfd0b538 100644 (file)
@@ -5381,8 +5381,8 @@ sub vmconfig_update_net {
     if ($hotplug) {
        if ($have_sdn) {
            PVE::Network::SDN::Vnets::add_next_free_cidr($newnet->{bridge}, $conf->{name}, $newnet->{macaddr}, $vmid, undef, 1);
+           PVE::Network::SDN::Vnets::add_dhcp_mapping($newnet->{bridge}, $newnet->{macaddr});
        }
-       PVE::Network::SDN::Vnets::add_dhcp_mapping($newnet->{bridge}, $newnet->{macaddr});
        vm_deviceplug($storecfg, $conf, $vmid, $opt, $newnet, $arch, $machine_type);
     } else {
        die "skip\n";