[pve-devel] [PATCH common 2/3] inotify/interfaces: fallback to cidr for address on write
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Mar 13 12:22:21 CET 2020
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/INotify.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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)) {
--
2.20.1
More information about the pve-devel
mailing list