]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
look up address, not AF. And print descriptive message
authorAlan T. DeKok <aland@freeradius.org>
Wed, 28 Mar 2018 14:58:17 +0000 (10:58 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 28 Mar 2018 15:21:29 +0000 (11:21 -0400)
src/modules/proto_radius/proto_radius_udp.c

index df4599255039225c5a6caf613149b45a396a7e39..136e89f0320772f29ec67aa74f8bf255e71d89d8 100644 (file)
@@ -1076,8 +1076,12 @@ static ssize_t mod_read(void *instance, void **packet_ctx, fr_time_t **recv_time
                 *      source address, returning the longest prefix
                 *      match with a known network.
                 */
-               network = fr_trie_lookup(inst->dynamic_clients.trie, &address.src_ipaddr, address.src_ipaddr.prefix);
-               if (!network) goto unknown;
+               network = fr_trie_lookup(inst->dynamic_clients.trie, &address.src_ipaddr.addr, address.src_ipaddr.prefix);
+               if (!network) {
+                       DEBUG("%s - Source IP address %pV was not within a known network",
+                             inst->name, fr_box_ipaddr(address.src_ipaddr));
+                       goto unknown;
+               }
 
                DEBUG("Found matching network.  Checking for dynamic client definition.");