Gabriel Goller <g.gol...@proxmox.com> writes:

> @@ -1066,7 +1061,12 @@ sub update_net {
>               if ($have_sdn && $bridge_changed) {
>                   
> PVE::Network::SDN::Vnets::add_next_free_cidr($newnet->{bridge}, 
> $conf->{hostname}, $newnet->{hwaddr}, $vmid, undef, 1);
>               }
> -             PVE::LXC::net_tap_plug($veth, $newnet);
> +             eval { PVE::LXC::net_tap_plug($veth, $newnet) };
> +             if ($@) {
> +                 my $err = $@;

                if (my $err = $@) {

Small nit, is a bit nicer.

> +                 PVE::LXC::net_tap_plug($veth, $oldnet);
> +                 die "$err\n";
> +             }
>
>               # This includes the rate:
>               foreach (qw(bridge tag firewall rate link_down)) {



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to