From: Alexandre Derumier Date: Thu, 9 Jan 2020 13:11:00 +0000 (+0100) Subject: Inotify: forbid ip address on bridged interface. X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=f5d8be06b657f43ba3b3447c38605b21fb151f65 Inotify: forbid ip address on bridged interface. Signed-off-by: Alexandre Derumier --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 867da30..b38d887 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1512,6 +1512,10 @@ 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 "\:\:"); + &$check_mtu($ifaces, $iface, $p); $bridgeports->{$p} = $iface; }