]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RADIUS: Allow 0.0.0.0 to be used as wildard radius_das_client
authorJouni Malinen <jouni@codeaurora.org>
Fri, 22 Jun 2018 08:47:19 +0000 (11:47 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 22 Jun 2018 16:37:18 +0000 (19:37 +0300)
This allows hostapd DAS to be configured to allow any DAC (with the
matching shared secret) to send Disconnect-Request and CoA-Request
packets.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
hostapd/hostapd.conf
src/radius/radius_das.c

index 8834ccfbf59d36690d30fa08f9a5ebdaa64ccacc..0de4b856965b0d110f0b327c04b089f552162ed4 100644 (file)
@@ -1191,6 +1191,8 @@ own_ip_addr=127.0.0.1
 #radius_das_port=3799
 #
 # DAS client (the host that can send Disconnect/CoA requests) and shared secret
+# Format: <IP address> <shared secret>
+# IP address 0.0.0.0 can be used to allow requests from any address.
 #radius_das_client=192.168.1.123 shared secret here
 #
 # DAS Event-Timestamp time window in seconds
index 0a0cf8ed4b8b20ee8a29267eb82fa99ee03516ec..aaa3fc26723ad16d3b492c3ceb8d61720bb9676c 100644 (file)
@@ -413,7 +413,8 @@ static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
 
        wpa_printf(MSG_DEBUG, "DAS: Received %d bytes from %s:%d",
                   len, abuf, from_port);
-       if (das->client_addr.u.v4.s_addr != from.sin.sin_addr.s_addr) {
+       if (das->client_addr.u.v4.s_addr &&
+           das->client_addr.u.v4.s_addr != from.sin.sin_addr.s_addr) {
                wpa_printf(MSG_DEBUG, "DAS: Drop message from unknown client");
                return;
        }