]> git.proxmox.com Git - pve-common.git/commitdiff
INotify: check bridge ip: add missing check if method is not defined
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 7 Feb 2020 11:40:27 +0000 (12:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 7 Feb 2020 11:56:24 +0000 (12:56 +0100)
src/PVE/INotify.pm

index 6e7a78c4323c06ba1b6803ee508024e5731ae7f1..7becbde4dd12163c03ba22401130399607a7ee66 100644 (file)
@@ -1562,8 +1562,8 @@ sub __write_etc_network_interfaces {
                my $n = $ifaces->{$p};
                die "bridge '$iface' - unable to find bridge port '$p'\n" if !$n;
                die "iface $p - ip address can't be set on interface if bridged in $iface\n"
-                   if ($n->{method} eq 'static' && $n->{address} ne '0.0.0.0') ||
-                      ($n->{method6} eq 'static' && $n->{address} ne '::');
+                   if ($n->{method} && $n->{method} eq 'static' && $n->{address} ne '0.0.0.0') ||
+                      ($n->{method6} && $n->{method6} eq 'static' && $n->{address} ne '::');
 
                &$check_mtu($ifaces, $p, $iface);
                $bridgeports->{$p} = $iface;