Revision 27588018
Added by Ermal LUÇI about 15 years ago
usr/local/captiveportal/radius_authentication.inc | ||
---|---|---|
51 | 51 |
global $config; |
52 | 52 |
|
53 | 53 |
$retvalue = array(); |
54 |
$nas_mac = mac_format(get_interface_mac($config['interfaces']['wan']['if']));
|
|
54 |
$nas_mac = mac_format(get_interface_mac(get_real_interface("wan")));
|
|
55 | 55 |
$clientmac = mac_format($clientmac); |
56 | 56 |
$nas_port = $ruleno; |
57 | 57 |
$radiusvendor = $config['captiveportal']['radiusvendor'] ? $config['captiveportal']['radiusvendor'] : null; |
... | ... | |
66 | 66 |
break; |
67 | 67 |
|
68 | 68 |
default: |
69 |
$calledstationid = $nas_mac;
|
|
69 |
$calledstationid = get_interface_ip("wan");
|
|
70 | 70 |
$callingstationid = $clientmac; |
71 | 71 |
} |
72 | 72 |
|
... | ... | |
74 | 74 |
$rauth = new Auth_RADIUS_PAP($username, $password); |
75 | 75 |
|
76 | 76 |
/* |
77 |
Add support for more then one radiusserver. |
|
78 |
At most 10 servers may be specified. |
|
79 |
When multiple servers are given, they are tried in round-robin fashion until a valid response is received |
|
80 |
*/ |
|
81 |
|
|
77 |
* Add support for more then one radiusserver. |
|
78 |
* At most 10 servers may be specified. |
|
79 |
* When multiple servers are given, they are tried in round-robin fashion until a valid response is received |
|
80 |
*/ |
|
82 | 81 |
foreach ($radiusservers as $radsrv) { |
83 |
|
|
84 | 82 |
// Add a new server to our instance |
85 | 83 |
$rauth->addServer($radsrv['ipaddr'], $radsrv['port'], $radsrv['key']); |
86 | 84 |
|
Also available in: Unified diff
Actually match the description and send the wan interface ip as Called-Station-Id on default settings.