summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2003-06-27 14:19:59 +0000
committerivan <ivan>2003-06-27 14:19:59 +0000
commit5aed678a590be255eccc42b944975c4a846b1807 (patch)
tree4111eef92853c37f32bb3617b876d3ddffa32347 /FS
parentdf4dc0977e94c79650236619593a9fc88d2037aa (diff)
add radius-ip configuration parameter for Framed-IP-Address vs. Framed-Address
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm8
-rw-r--r--FS/FS/svc_acct.pm5
2 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 84b3c26ed..706ebe720 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1032,6 +1032,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 1fed9520f..5b8107fc8 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -9,7 +9,7 @@ use vars qw( @ISA $DEBUG $me $conf
$username_uppercase
$welcome_template $welcome_from $welcome_subject $welcome_mimetype
$smtpmachine
- $radius_password
+ $radius_password $radius_ip
$dirhash
@saltset @pw_set );
use Carp;
@@ -68,6 +68,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' , '.' , '/' );
@@ -866,7 +867,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;
}