diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-01-03 11:00:39 -0800 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2012-01-03 11:00:39 -0800 |
commit | a5fee35267cf7527a96d8042b31d7f6adf4a5646 (patch) | |
tree | 68c6989e8784be44ab1a967b9aff3b1e3264e89a /scripts/vyatta-bridge.pl | |
parent | 20ae65b9ed930519c2a1ea3c919ee02fed23eb42 (diff) | |
download | vyatta-cfg-system-a5fee35267cf7527a96d8042b31d7f6adf4a5646.tar.gz vyatta-cfg-system-a5fee35267cf7527a96d8042b31d7f6adf4a5646.zip |
Check for conflict between pseudo-ethernet and bonding,bridging
Don't allow configuring bonding or bridging if pseudo-ethernet
is in use.
Diffstat (limited to 'scripts/vyatta-bridge.pl')
-rwxr-xr-x | scripts/vyatta-bridge.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/vyatta-bridge.pl b/scripts/vyatta-bridge.pl index bb0d41c3..68d3e107 100755 --- a/scripts/vyatta-bridge.pl +++ b/scripts/vyatta-bridge.pl @@ -68,6 +68,14 @@ if ( $action eq 'SET' ) { die "Error: Can not add interface $ifname with VRRP to bridge\n" if (@vrrp); + $cfg->setLevel('interfaces pseudo-ethernet'); + foreach my $peth ($cfg->listNodes()) { + my $link = $cfg->returnValue("$peth link"); + + die "Error: can not add interface $slave to bridge already used by pseudo-ethernet $peth\n" + if ($link eq $slave); + } + print "Adding interface $ifname to bridge $newbridge\n"; add_bridge_port($newbridge, $ifname, $cost, $priority); |