]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RADIUS server: Copy IPv4 address only when IPv6 is not used
authorJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 15:01:32 +0000 (17:01 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 15:15:12 +0000 (17:15 +0200)
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>
src/radius/radius_server.c

index 5074b6029d356e78da0b674976615effa65cd287..6b86932ac8b7736233fda441932b114768624016 100644 (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);