5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2024-12-22 21:33:47 +03:00

INotify: check bridge ip: add missing check if method is not defined

This commit is contained in:
Alexandre Derumier 2020-02-07 12:40:27 +01:00 committed by Thomas Lamprecht
parent 968c90f174
commit dd3004e266

View 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;