summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-24 23:19:21 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-24 23:19:21 +0000
commit8388fb1fa0ba567ca2489e4d7492a763ee2aed42 (patch)
tree2a30e05a074ec240465a8a508c07924566437f3d /lib
parentf66e1f341a3c757107f0a386487f9d17557e29fe (diff)
downloaddrakx-net-8388fb1fa0ba567ca2489e4d7492a763ee2aed42.tar
drakx-net-8388fb1fa0ba567ca2489e4d7492a763ee2aed42.tar.gz
drakx-net-8388fb1fa0ba567ca2489e4d7492a763ee2aed42.tar.bz2
drakx-net-8388fb1fa0ba567ca2489e4d7492a763ee2aed42.tar.xz
drakx-net-8388fb1fa0ba567ca2489e4d7492a763ee2aed42.zip
extract atm interfaces
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection/xdsl.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/network/connection/xdsl.pm b/lib/network/connection/xdsl.pm
index 7c88dff..458619c 100644
--- a/lib/network/connection/xdsl.pm
+++ b/lib/network/connection/xdsl.pm
@@ -34,11 +34,13 @@ sub uses_atm_arp {
my ($self) = @_;
$self->{device}{xdsl_type} eq 'usb' && !$self->uses_ppp;
}
+sub get_atm_arp_interface { "atm0" }
sub uses_atm_bridging {
my ($self) = @_;
$self->{device}{xdsl_type} eq 'usb' && member($self->{protocol}, qw(pppoe));
}
+sub get_atm_bridging_interface { "nas0" }
my %protocol_settings = (
pppoa => {
@@ -316,14 +318,14 @@ sub build_ifcfg_settings {
if ($self->uses_atm_arp) {
#- use ATMARP with the atm0 interface
put_in_hash({
- DEVICE => "atm0",
+ DEVICE => $self->get_atm_arp_interface,
ATM_ADDR => join('.', @{$self->{access}{peer}}{qw(vpi vci)}),
MII_NOT_SUPPORTED => "yes",
}, $settings);
}
if ($self->uses_atm_bridging) {
put_in_hash({
- ATM_DEVICE => "nas0",
+ ATM_DEVICE => $self->get_atm_bridging_interface,
ATM_ADDR => join('.', @{$self->{access}{peer}}{qw(vpi vci)}),
}, $settings);
}