From 8388fb1fa0ba567ca2489e4d7492a763ee2aed42 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 24 Nov 2008 23:19:21 +0000 Subject: extract atm interfaces --- lib/network/connection/xdsl.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/network/connection') 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); } -- cgit v1.2.1