From: Alexandre Derumier Date: Tue, 28 Aug 2018 11:31:53 +0000 (+0200) Subject: Inotify: check bridgeport: fix vlan interface not defined X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=514c2138d1933f8b1e19993b7bc9da874800cf93 Inotify: check bridgeport: fix vlan interface not defined We can add to a bridge a non defined vlan interface. We only need to check that physical interface exist example: auto eno1 iface eno1 inet manual auto vmbr0 iface vmbr0 inet manual bridge_ports eno1.1 [w.bumiller@proxmox.com: style & commit message fixup] Signed-off-by: Wolfgang Bumiller --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index e37b4af..fc9471d 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1409,6 +1409,7 @@ sub __write_etc_network_interfaces { my $d = $ifaces->{$iface}; if ($d->{type} eq 'bridge') { foreach my $p (split (/\s+/, $d->{bridge_ports})) { + $p =~ s/\.\d+$//; my $n = $ifaces->{$p}; die "bridge '$iface' - unable to find bridge port '$p'\n" if !$n;