[PATCH] Use a random initial value for next_radius_identifier so that the identifier is less likely to be reused when multiple hostapd instances are running that will appear to a RADIUS server as being from the same NAS.

Nick Lowe nick.lowe at lugatech.com
Tue Jul 26 07:18:08 PDT 2016


[PATCH] Use a random initial value for next_radius_identifier so that
 the identifier is less likely to be reused when multiple hostapd instances
 are running that will appear to a RADIUS server as being from the same NAS.

Signed-off-by: Nick Lowe <nick.lowe at lugatech.com>
---
 src/radius/radius_client.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/radius/radius_client.c b/src/radius/radius_client.c
index a4edd5f..bfe42e1 100644
--- a/src/radius/radius_client.c
+++ b/src/radius/radius_client.c
@@ -1446,6 +1446,10 @@ radius_client_init(void *ctx, struct
hostapd_radius_servers *conf)
  radius->auth_serv_sock = radius->acct_serv_sock =
  radius->auth_serv_sock6 = radius->acct_serv_sock6 =
  radius->auth_sock = radius->acct_sock = -1;
+ if (os_get_random((u8 *) &radius->next_radius_identifier,
sizeof(radius->next_radius_identifier)) < 0) {
+ radius_client_deinit(radius);
+ return NULL;
+ }

  if (conf->auth_server && radius_client_init_auth(radius)) {
  radius_client_deinit(radius);
-- 
2.7.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-a-random-initial-value-for-next_radius_identifie.patch
Type: application/octet-stream
Size: 1181 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20160726/c2ea70bb/attachment-0001.obj>


More information about the Hostap mailing list