summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-11-17 17:43:09 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2008-11-17 17:43:09 -0800
commit7a6c522c3968712b05cf6d1dc473219ec6edf6a6 (patch)
tree9faf302ad45a7658974d4a0ad8cb7818de5b9f9b
parent571ffbe1034197f7f3ab6374e7c978fc172efbb3 (diff)
downloadvyatta-cfg-7a6c522c3968712b05cf6d1dc473219ec6edf6a6.tar.gz
vyatta-cfg-7a6c522c3968712b05cf6d1dc473219ec6edf6a6.zip
add check for bond vif interface to submodule
-rw-r--r--scripts/vyatta-interfaces.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 6ece6c0..2a47bce 100644
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -129,6 +129,8 @@ sub is_address_enabled {
## FIXME this is name based madness find a better way
## so we don't have to redo with each interface type!
+ ## POSSIBLE SOLUTION: pass the cli-path uptill 'address' node from
+ ## address/node.def so we don't have to determine the address type here
if ($intf =~ m/^eth/) {
if ($intf =~ m/(\w+)\.(\d+)/) {
$config->setLevel("interfaces ethernet $1 vif $2");
@@ -136,7 +138,11 @@ sub is_address_enabled {
$config->setLevel("interfaces ethernet $intf");
}
} elsif ($intf =~ m/^bond/) {
- $config->setLevel("interfaces bonding $intf");
+ if ($intf =~ m/(\w+)\.(\d+)/) {
+ $config->setLevel("interfaces bonding $1 vif $2");
+ } else {
+ $config->setLevel("interfaces bonding $intf");
+ }
} elsif ($intf =~ m/^br/) {
$config->setLevel("interfaces bridge $intf");
} else {