From f5d8be06b657f43ba3b3447c38605b21fb151f65 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Thu, 9 Jan 2020 14:11:00 +0100 Subject: [PATCH] Inotify: forbid ip address on bridged interface. Signed-off-by: Alexandre Derumier --- src/PVE/INotify.pm | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.2