[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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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@xxxxxxxxxxxx>
---
 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

Attachment: 0001-Use-a-random-initial-value-for-next_radius_identifie.patch
Description: Binary data

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux