X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FINotify.pm;h=1a528fa356bc0f7207dfeb4f816487ca596b7d4e;hp=22f413b77ba3313e9cf9828ca8a1e5ce519ab45d;hb=c8ff0bdf3dd8606400cf2999c770408f1ef02d84;hpb=1f929ade0a08f9a402dcc74ae96b36e8d44b1eff diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 22f413b..1a528fa 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -901,6 +901,7 @@ sub __read_etc_network_interfaces { SECTION: while (defined ($line = <$fh>)) { chomp ($line); next if $line =~ m/^\s*#/; + next if $line =~ m/^\s*(allow-hotplug)\s+(.*)$/; if ($line =~ m/^\s*(auto|allow-ovs)\s+(.*)$/) { my @aa = split (/\s+/, $2); @@ -1473,9 +1474,7 @@ sub __write_etc_network_interfaces { die "vlan '$iface' - unable to find parent '$p'\n" if !$n; - if ($n->{type} eq 'bridge' && !$n->{bridge_vlan_aware}) { - die "vlan '$iface' - bridge vlan aware is not enabled on parent '$p'\n"; - } elsif ($n->{type} ne 'eth' && $n->{type} ne 'bridge' && $n->{type} ne 'bond' && $n->{type} ne 'vlan') { + if ($n->{type} ne 'eth' && $n->{type} ne 'bridge' && $n->{type} ne 'bond' && $n->{type} ne 'vlan') { die "vlan '$iface' - wrong interface type on parent '$p' " . "('$n->{type}' != 'eth|bond|bridge|vlan' )\n"; } @@ -1511,6 +1510,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; }