mirror of
git://git.proxmox.com/git/pve-common.git
synced 2024-12-22 21:33:47 +03:00
INotify: write network: don't duplicate bridge-vids
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
b7c4f37851
commit
f6c4a56381
@ -896,7 +896,7 @@ sub __read_etc_network_interfaces {
|
||||
} else {
|
||||
$d->{$id} = 'off';
|
||||
}
|
||||
} elsif ($id eq 'bridge_fd') {
|
||||
} elsif ($id eq 'bridge_fd' || $id eq 'bridge_vids') {
|
||||
$d->{$id} = $value;
|
||||
} elsif ($id eq 'bridge_vlan_aware') {
|
||||
$d->{$id} = 1;
|
||||
@ -1096,6 +1096,7 @@ sub __interface_to_string {
|
||||
$raw .= "\tbridge-vids $v\n";
|
||||
}
|
||||
$done->{bridge_vlan_aware} = 1;
|
||||
$done->{bridge_vids} = 1;
|
||||
|
||||
} elsif ($d->{type} eq 'bond') {
|
||||
|
||||
|
35
test/etc_network_interfaces/t.parsed_options.pl
Normal file
35
test/etc_network_interfaces/t.parsed_options.pl
Normal file
@ -0,0 +1,35 @@
|
||||
save('proc_net_dev', <<'/proc/net/dev');
|
||||
eth0:
|
||||
eth1:
|
||||
/proc/net/dev
|
||||
|
||||
# Check for dropped or duplicated options
|
||||
|
||||
my $ip = '192.168.0.2';
|
||||
my $nm = '255.255.255.0';
|
||||
my $gw = '192.168.0.1';
|
||||
my $ip6 = 'fc05::2';
|
||||
my $nm6 = '112';
|
||||
my $gw6 = 'fc05::1';
|
||||
|
||||
# Load
|
||||
my $cfg = load('base') . <<"CHECK";
|
||||
iface eth1 inet manual
|
||||
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address 10.0.0.2
|
||||
netmask 255.255.255.0
|
||||
gateway 10.0.0.1
|
||||
bridge-ports eth0
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
bridge-vlan-aware yes
|
||||
bridge-vids 2-4094
|
||||
|
||||
CHECK
|
||||
|
||||
r $cfg;
|
||||
expect $cfg;
|
||||
|
||||
1;
|
Loading…
Reference in New Issue
Block a user