From dd3004e266b5a9fa39803be065e474ede92b603a Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 7 Feb 2020 12:40:27 +0100 Subject: [PATCH] INotify: check bridge ip: add missing check if method is not defined --- src/PVE/INotify.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 6e7a78c..7becbde 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -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; -- 2.39.2