5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-22 06:04:10 +03:00

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 <w.bumiller@proxmox.com>
This commit is contained in:
Alexandre Derumier 2018-08-28 13:31:53 +02:00 committed by Wolfgang Bumiller
parent 000e32bc4a
commit 514c2138d1

View File

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