RADIUS server: Copy IPv4 address only when IPv6 is not used

The local addr variable is valid only when !ipv6, so there is no point
in copying it for the IPv6 case.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-03-02 17:01:32 +02:00
parent 508e24c20b
commit 7738163951

View file

@ -1371,8 +1371,8 @@ radius_server_read_clients(const char *client_file, int ipv6)
break;
}
entry->shared_secret_len = os_strlen(entry->shared_secret);
entry->addr.s_addr = addr.s_addr;
if (!ipv6) {
entry->addr.s_addr = addr.s_addr;
val = 0;
for (i = 0; i < mask; i++)
val |= 1 << (31 - i);