From 4b8f97020f99eb3b92bb8c9571ca6032949b84e8 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 24 Nov 2008 16:16:47 +0000 Subject: extract uses_atmarp --- lib/network/connection/xdsl.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/network/connection/xdsl.pm b/lib/network/connection/xdsl.pm index cf7e74e..1f3da6f 100644 --- a/lib/network/connection/xdsl.pm +++ b/lib/network/connection/xdsl.pm @@ -30,6 +30,11 @@ sub uses_ppp { !member($self->{protocol}, @non_ppp_protocols); } +sub uses_atmarp { + my ($self) = @_; + $self->{device}{xdsl_type} eq 'usb' && !$self->uses_ppp; +} + my %protocol_settings = ( pppoa => { plugin => sub { @@ -303,7 +308,7 @@ sub build_ifcfg_settings { my $settings = { if_($self->uses_ppp, TYPE => 'ADSL'), }; - if ($self->{device}{xdsl_type} eq 'usb' && !$self->uses_ppp) { + if ($self->uses_atmarp) { #- use ATMARP with the atm0 interface put_in_hash({ DEVICE => "atm0", -- cgit v1.2.1