projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa6e694
)
inotify/interfaces: fallback to cidr for address on write
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Fri, 13 Mar 2020 10:36:31 +0000
(11:36 +0100)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Fri, 13 Mar 2020 10:36:31 +0000
(11:36 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/INotify.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/INotify.pm
b/src/PVE/INotify.pm
index ae9e5e2777040f60aaf4bcc072c021a60efb5004..3fa5af62777db77a73252c4cf64017b8c5939459 100644
(file)
--- 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)) {