summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-12 15:56:01 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-12 15:56:01 -0700
commit17930c693d449784e7d6d5aa12748de921664527 (patch)
tree32ed0f8efdec4733da758af5e11a84ee7e37cdc3 /lib
parent62386c46dc0029eaefff55966d8cdaa6b53b1ab2 (diff)
downloadvyatta-cfg-17930c693d449784e7d6d5aa12748de921664527.tar.gz
vyatta-cfg-17930c693d449784e7d6d5aa12748de921664527.zip
add required special cases for adsl/pppo* interfaces.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Interface.pm28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm
index 4c7244a..ff9e067 100755
--- a/lib/Vyatta/Interface.pm
+++ b/lib/Vyatta/Interface.pm
@@ -108,6 +108,34 @@ sub get_all_cfg_interfaces {
}
}
}
+
+ # now special cases for pppo*/adsl
+ for my $eth ($cfg->$vfunc('interfaces ethernet')) {
+ for my $ep ($cfg->$vfunc("interfaces ethernet $eth pppoe")) {
+ push @ret_ifs, { 'name' => "pppoe$ep",
+ 'path' => "interfaces ethernet $eth pppoe $ep" };
+ }
+ }
+ for my $a ($cfg->$vfunc('interfaces adsl')) {
+ for my $p ($cfg->$vfunc("interfaces adsl $a pvc")) {
+ for my $t ($cfg->$vfunc("interfaces adsl $a pvc $p")) {
+ if ($t eq 'classical-ipoa' or $t eq 'bridged-ethernet') {
+ # classical-ipoa or bridged-ethernet
+ push @ret_ifs,
+ { 'name' => $a,
+ 'path' => "interfaces adsl $a pvc $p $t" };
+ next;
+ }
+ # pppo[ea]
+ for my $i ($cfg->$vfunc("interfaces adsl $a pvc $p $t")) {
+ push @ret_ifs,
+ { 'name' => "$t$i",
+ 'path' => "interfaces adsl $a pvc $p $t $i" };
+ }
+ }
+ }
+ }
+
return @ret_ifs;
}