summaryrefslogtreecommitdiff
path: root/scripts/vyatta-bonding.pl
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2012-01-03 11:00:39 -0800
committerStephen Hemminger <shemminger@vyatta.com>2012-01-03 11:00:39 -0800
commita5fee35267cf7527a96d8042b31d7f6adf4a5646 (patch)
tree68c6989e8784be44ab1a967b9aff3b1e3264e89a /scripts/vyatta-bonding.pl
parent20ae65b9ed930519c2a1ea3c919ee02fed23eb42 (diff)
downloadvyatta-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-bonding.pl')
-rwxr-xr-xscripts/vyatta-bonding.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl
index 71707126..aa733b61 100755
--- a/scripts/vyatta-bonding.pl
+++ b/scripts/vyatta-bonding.pl
@@ -225,6 +225,14 @@ sub commit_check {
my @vrrp = $cfg->listNodes('vrrp vrrp-group');
die "Error: can not add interface $slave with VRRP to bond-group\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 bond-group already used by pseudo-ethernet $peth\n"
+ if ($link eq $slave);
+ }
}
# bonding requires interface to be down before enslaving