From 27588018f41b6935e0fdb4fc5d197eb56ce49e16 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 24 May 2010 22:18:02 +0000 Subject: Actually match the description and send the wan interface ip as Called-Station-Id on default settings. --- usr/local/captiveportal/radius_authentication.inc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'usr') diff --git a/usr/local/captiveportal/radius_authentication.inc b/usr/local/captiveportal/radius_authentication.inc index 01ec063..7f37b03 100644 --- a/usr/local/captiveportal/radius_authentication.inc +++ b/usr/local/captiveportal/radius_authentication.inc @@ -51,7 +51,7 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli global $config; $retvalue = array(); - $nas_mac = mac_format(get_interface_mac($config['interfaces']['wan']['if'])); + $nas_mac = mac_format(get_interface_mac(get_real_interface("wan"))); $clientmac = mac_format($clientmac); $nas_port = $ruleno; $radiusvendor = $config['captiveportal']['radiusvendor'] ? $config['captiveportal']['radiusvendor'] : null; @@ -66,7 +66,7 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli break; default: - $calledstationid = $nas_mac; + $calledstationid = get_interface_ip("wan"); $callingstationid = $clientmac; } @@ -74,13 +74,11 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli $rauth = new Auth_RADIUS_PAP($username, $password); /* - Add support for more then one radiusserver. - At most 10 servers may be specified. - When multiple servers are given, they are tried in round-robin fashion until a valid response is received - */ - + * Add support for more then one radiusserver. + * At most 10 servers may be specified. + * When multiple servers are given, they are tried in round-robin fashion until a valid response is received + */ foreach ($radiusservers as $radsrv) { - // Add a new server to our instance $rauth->addServer($radsrv['ipaddr'], $radsrv['port'], $radsrv['key']); -- cgit v1.1