summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {