From 10193482ba6b9b3e5c1440ac729d3ba2a06ee0ff Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 30 Apr 2012 16:16:00 -0700 Subject: 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. .. 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. --- lib/Vyatta/Interface.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Vyatta') 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 . 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; -- cgit v1.2.3