From 2b38eafa8217b4b393b1778a1c56857e24c3863c Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 27 Jun 2003 14:19:55 +0000 Subject: [PATCH] add radius-ip configuration parameter for Framed-IP-Address vs. Framed-Address --- FS/FS/Conf.pm | 8 ++++++++ FS/FS/svc_acct.pm | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index bc16a4024..50e9e6c02 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1039,6 +1039,14 @@ httemplate/docs/config.html }, { + 'key' => 'radius-ip', + 'section' => '', + 'description' => 'RADIUS attribute for IP addresses.', + 'type' => 'select', + 'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ], + }, + + { 'key' => 'svc_acct-alldomains', 'section' => '', 'description' => 'Allow accounts to select any domain in the database. Normally accounts can only select from the domain set in the service definition and those purchased by the customer.', diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 14e18442f..5451e6775 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -10,7 +10,7 @@ use vars qw( @ISA $DEBUG $me $conf $mydomain $welcome_template $welcome_from $welcome_subject $welcome_mimetype $smtpmachine - $radius_password + $radius_password $radius_ip $dirhash @saltset @pw_set ); use Carp; @@ -72,6 +72,7 @@ $FS::UID::callback{'FS::svc_acct'} = sub { } $smtpmachine = $conf->config('smtpmachine'); $radius_password = $conf->config('radius-password') || 'Password'; + $radius_ip = $conf->config('radius-ip') || 'Framed-IP-Address'; }; @saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); @@ -873,7 +874,7 @@ sub radius_reply { ( $FS::raddb::attrib{lc($attrib)}, $self->getfield($column) ); } grep { /^radius_/ && $self->getfield($_) } fields( $self->table ); if ( $self->slipip && $self->slipip ne '0e0' ) { - $reply{'Framed-IP-Address'} = $self->slipip; + $reply{$radius_ip} = $self->slipip; } %reply; } -- 2.11.0