From: Thomas Lamprecht Date: Fri, 13 Mar 2020 10:36:31 +0000 (+0100) Subject: inotify/interfaces: fallback to cidr for address on write X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=9197b046728140d69629d5dd02a10763a1a6da76 inotify/interfaces: fallback to cidr for address on write Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index ae9e5e2..3fa5af6 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1413,8 +1413,9 @@ sub __write_etc_network_interfaces { foreach my $iface (keys %$ifaces) { my $d = $ifaces->{$iface}; - delete $d->{cidr}; - delete $d->{cidr6}; + my ($cidr, $cidr6) = (delete $d->{cidr}, delete $d->{cidr6}); + $d->{address} //= $cidr; + $d->{address6} //= $cidr6; my $ports = ''; foreach my $k (qw(bridge_ports ovs_ports slaves ovs_bonds)) {