network: fix uninitialized value error

This commit is contained in:
Wolfgang Bumiller 2016-01-18 09:17:23 +01:00 committed by Dietmar Maurer
parent 8992139368
commit 846337ad41

View File

@ -177,12 +177,14 @@ my $bridge_add_interface = sub {
die "unable to add default vlan tags to interface $iface\n" if !$trunks; die "unable to add default vlan tags to interface $iface\n" if !$trunks;
} }
if ($trunks) {
my @trunks_array = split /;/, $trunks; my @trunks_array = split /;/, $trunks;
foreach my $trunk (@trunks_array) { foreach my $trunk (@trunks_array) {
system("/sbin/bridge vlan add dev $iface vid $trunk") == 0 || system("/sbin/bridge vlan add dev $iface vid $trunk") == 0 ||
die "unable to add vlan $trunk to interface $iface\n"; die "unable to add vlan $trunk to interface $iface\n";
} }
} }
}
}; };
my $ovs_bridge_add_port = sub { my $ovs_bridge_add_port = sub {