summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-04-30 16:16:00 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-04-30 16:16:00 -0700
commit10193482ba6b9b3e5c1440ac729d3ba2a06ee0ff (patch)
tree55ef35ab38addab285875d1cf755f9527470df67 /lib
parent207b0325c7c00573f471ff7fbf0b204d05acdb64 (diff)
downloadvyatta-cfg-10193482ba6b9b3e5c1440ac729d3ba2a06ee0ff.tar.gz
vyatta-cfg-10193482ba6b9b3e5c1440ac729d3ba2a06ee0ff.zip
Bugfix 8017:
Make parsing of multilink config options work properly. Multilink interfaces have one allowed vif. They do not show up with the same way as all the other vifs on the system, i.e. <if>.<vif>. In order for scripts using a generic config path parsing mechanism to work with multilink interfaces we must return the path with 'vif 1' appended after 'mlX' e.g. 'interfaces multilink mlX vif 1' is the proper path for options under the 'interface multilink mlX' tree.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Interface.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm
index 2cc47ba..4f587b8 100755
--- a/lib/Vyatta/Interface.pm
+++ b/lib/Vyatta/Interface.pm
@@ -298,6 +298,9 @@ sub new {
my $path = "interfaces $type $dev";
$path .= " $vifpath $vif" if $vif;
+ # add the vif 1 to multilink paths since they don't have vif interfaces
+ # denoted by <if>.<vif> and only allow 1 vif to be set
+ $path .= " vif 1" if ($dev =~ m/ml[\d]+$/);
$path .= " vrrp vrrp-group $vrid interface" if $vrid;
$type = 'vrrp' if $vrid;