Subnetting is not working with most relevant entry

I've just checked out that branch and I see it too. It must be in the code from a merge gone wrong.. investigating...

1 Like

Found the conflict and pushed a resolved version. Try an update on that branch please and confirm that the extraneous characters are gone.

Can confirm it is gone.

1 Like

While playing with subnet assignment I came across the fact that there is no output to which groups a client belongs if different (non-identical) subnets are defined.
I created "subnet clients" /16 and /24 and assigned different groups to them. Connecting a device in both ranges, only the /24 should apply. But there is no indication (on cli and web interface) to which group the client was assigned in the end.

[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.579 3137] Querying gravity database for client 10.0.10.136 (getting groups)

It would be helpful if something like this would be added

Client 10.0.10.136 matched two different subnets (Client ID 3,4). Choosing the maximum match (Client ID 3) and assigned corresponding Group IDs (7,8)"

EDIT
I switched to new/mac_clients and saw that it is already implemented.

[2020-06-09 19:23:23.446 7022] Querying gravity database for client with IP 10.0.10.136...
[2020-06-09 19:23:23.446 7022] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 19:23:23.446 7022] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] --> Found record for 10.0.10.136 in the client (ID 6)
[2020-06-09 19:23:23.447 7022] Querying gravity database for client 10.0.10.136 (getting groups)
[2020-06-09 19:23:23.447 7022] Gravity database: Client 10.0.10.136 found. Using groups [7].

Also this (scroll down if your browser doesn't do it for you):

This should be a clear warning (I don't see it your log excerpt?).

That does work as expected and trigger warinings. But it does just work for identical subnets. It does not warn (no reason for warning, just a indication of group assignment wanted) for subets that are within a bigger subnet.

Sub1: 10.0.1.0/16 - Test 2
Sub2 10.0.10.0/24 - Test 1

Which Group will be assigned to Client: 10.0.10.136 (best match would be /24 - Test 1)? And where can I see which groups have been assigned at the end?

Ah, yes, sorry, I missed that above.

The best match will be assigned. Warnings are only generated when the best match is ambiguous (like 10.0.1.0/16 and 10.0.2.0/16 (which is the same thing).

When enabling the appropriate debug flag (DEBUG_DATABASE in v5.0, and a dedicated DEBUG_CLIENTS in the next version, v5.1), you can get this from the log just as you posted above:

where [7] is an array of all group IDs enabled for this client. There is no per-name/description output here.

Please check again.
I'm on

  Pi-hole version is development v5.0-86-g4b59287 (Latest: v5.0)
  AdminLTE version is devel v5.0-387-g557bd858 (Latest: v5.0)
  FTL version is development vDev-6c32fb8 (Latest: v5.0)

DEBUG_CLIENTS

[2020-06-13 09:09:15.930 6806] Using log file /var/log/pihole-FTL.log
[2020-06-13 09:09:15.930 6806] ########## FTL started! ##########
[2020-06-13 09:09:15.930 6806] FTL branch: development
[2020-06-13 09:09:15.930 6806] FTL version: vDev-6c32fb8
[2020-06-13 09:09:15.930 6806] FTL commit: 6c32fb8
[2020-06-13 09:09:15.930 6806] FTL date: 2020-06-04 15:39:51 +0200
[2020-06-13 09:09:15.930 6806] FTL user: pihole
[2020-06-13 09:09:15.930 6806] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-06-13 09:09:15.930 6806] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2020-06-13 09:09:15.930 6806]    SOCKET_LISTENING: only local
[2020-06-13 09:09:15.930 6806]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2020-06-13 09:09:15.930 6806]    MAXDBDAYS: max age for stored queries is 90 days
[2020-06-13 09:09:15.930 6806]    RESOLVE_IPV6: Resolve IPv6 addresses
[2020-06-13 09:09:15.930 6806]    RESOLVE_IPV4: Resolve IPv4 addresses
[2020-06-13 09:09:15.931 6806]    DBINTERVAL: saving to DB file every minute
[2020-06-13 09:09:15.931 6806]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2020-06-13 09:09:15.931 6806]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2020-06-13 09:09:15.931 6806]    PRIVACYLEVEL: Set to 0
[2020-06-13 09:09:15.931 6806]    IGNORE_LOCALHOST: Show queries from localhost
[2020-06-13 09:09:15.931 6806]    BLOCKINGMODE: Null IPs for blocked domains
[2020-06-13 09:09:15.931 6806]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2020-06-13 09:09:15.931 6806]    DBIMPORT: Importing history from database
[2020-06-13 09:09:15.931 6806]    PIDFILE: Using /run/pihole-FTL.pid
[2020-06-13 09:09:15.931 6806]    PORTFILE: Using /run/pihole-FTL.port
[2020-06-13 09:09:15.931 6806]    SOCKETFILE: Using /run/pihole/FTL.sock
[2020-06-13 09:09:15.931 6806]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2020-06-13 09:09:15.931 6806]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2020-06-13 09:09:15.931 6806]    GRAVITYDB: Using /etc/pihole/gravity.db
[2020-06-13 09:09:15.931 6806]    PARSE_ARP_CACHE: Active
[2020-06-13 09:09:15.932 6806]    CNAME_DEEP_INSPECT: Active
[2020-06-13 09:09:15.932 6806]    DELAY_STARTUP: No delay requested.
[2020-06-13 09:09:15.932 6806]    NICE: Set process niceness to -10 (default)
[2020-06-13 09:09:15.932 6806]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2020-06-13 09:09:15.932 6806]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2020-06-13 09:09:15.932 6806] Finished config file parsing
[2020-06-13 09:09:15.934 6806] Database version is 6
[2020-06-13 09:09:15.934 6806] Database successfully initialized
[2020-06-13 09:09:15.935 6806] New upstream server: 127.0.0.1 (0/128)
[2020-06-13 09:09:15.951 6806] Resizing "/FTL-strings" from 4096 to 8192
[2020-06-13 09:09:15.970 6806] Resizing "/FTL-strings" from 8192 to 12288
[2020-06-13 09:09:15.973 6806] Resizing "/FTL-queries" from 262144 to 524288
[2020-06-13 09:09:15.990 6806] Resizing "/FTL-strings" from 12288 to 16384
[2020-06-13 09:09:16.020 6806] Resizing "/FTL-strings" from 16384 to 20480
[2020-06-13 09:09:16.036 6806] Resizing "/FTL-queries" from 524288 to 786432
[2020-06-13 09:09:16.084 6806] Resizing "/FTL-queries" from 786432 to 1048576
[2020-06-13 09:09:16.109 6806] Imported 13686 queries from the long-term database
[2020-06-13 09:09:16.110 6806]  -> Total DNS queries: 13686
[2020-06-13 09:09:16.110 6806]  -> Cached DNS queries: 5218
[2020-06-13 09:09:16.110 6806]  -> Forwarded DNS queries: 7267
[2020-06-13 09:09:16.110 6806]  -> Blocked DNS queries: 1201
[2020-06-13 09:09:16.110 6806]  -> Unknown DNS queries: 0
[2020-06-13 09:09:16.110 6806]  -> Unique domains: 944
[2020-06-13 09:09:16.110 6806]  -> Unique clients: 12
[2020-06-13 09:09:16.110 6806]  -> Known forward destinations: 1
[2020-06-13 09:09:16.110 6806] Successfully accessed setupVars.conf
[2020-06-13 09:09:16.118 6808] PID of FTL process: 6808
[2020-06-13 09:09:16.118 6808] Listening on port 4711 for incoming IPv4 telnet connections
[2020-06-13 09:09:16.119 6808] Listening on port 4711 for incoming IPv6 telnet connections
[2020-06-13 09:09:16.119 6808] Listening on Unix socket
[2020-06-13 09:09:16.122 6808] Reloading DNS cache
[2020-06-13 09:09:16.122 6808] Blocking status is enabled
[2020-06-13 09:09:16.158 6808] Compiled 1 whitelist and 25 blacklist regex filters in 23.2 msec

DEBUG_DATABASE

[2020-06-13 09:10:13.714 6923] Using log file /var/log/pihole-FTL.log
[2020-06-13 09:10:13.715 6923] ########## FTL started! ##########
[2020-06-13 09:10:13.715 6923] FTL branch: development
[2020-06-13 09:10:13.715 6923] FTL version: vDev-6c32fb8
[2020-06-13 09:10:13.715 6923] FTL commit: 6c32fb8
[2020-06-13 09:10:13.715 6923] FTL date: 2020-06-04 15:39:51 +0200
[2020-06-13 09:10:13.715 6923] FTL user: pihole
[2020-06-13 09:10:13.715 6923] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-06-13 09:10:13.715 6923] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2020-06-13 09:10:13.715 6923]    SOCKET_LISTENING: only local
[2020-06-13 09:10:13.715 6923]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2020-06-13 09:10:13.715 6923]    MAXDBDAYS: max age for stored queries is 90 days
[2020-06-13 09:10:13.715 6923]    RESOLVE_IPV6: Resolve IPv6 addresses
[2020-06-13 09:10:13.715 6923]    RESOLVE_IPV4: Resolve IPv4 addresses
[2020-06-13 09:10:13.715 6923]    DBINTERVAL: saving to DB file every minute
[2020-06-13 09:10:13.715 6923]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2020-06-13 09:10:13.716 6923]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2020-06-13 09:10:13.716 6923]    PRIVACYLEVEL: Set to 0
[2020-06-13 09:10:13.716 6923]    IGNORE_LOCALHOST: Show queries from localhost
[2020-06-13 09:10:13.716 6923]    BLOCKINGMODE: Null IPs for blocked domains
[2020-06-13 09:10:13.716 6923]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2020-06-13 09:10:13.716 6923]    DBIMPORT: Importing history from database
[2020-06-13 09:10:13.716 6923]    PIDFILE: Using /run/pihole-FTL.pid
[2020-06-13 09:10:13.716 6923]    PORTFILE: Using /run/pihole-FTL.port
[2020-06-13 09:10:13.716 6923]    SOCKETFILE: Using /run/pihole/FTL.sock
[2020-06-13 09:10:13.716 6923]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2020-06-13 09:10:13.716 6923]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2020-06-13 09:10:13.716 6923]    GRAVITYDB: Using /etc/pihole/gravity.db
[2020-06-13 09:10:13.716 6923]    PARSE_ARP_CACHE: Active
[2020-06-13 09:10:13.716 6923]    CNAME_DEEP_INSPECT: Active
[2020-06-13 09:10:13.716 6923]    DELAY_STARTUP: No delay requested.
[2020-06-13 09:10:13.716 6923]    NICE: Set process niceness to -10 (default)
[2020-06-13 09:10:13.717 6923]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2020-06-13 09:10:13.717 6923]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2020-06-13 09:10:13.717 6923] *****************************
[2020-06-13 09:10:13.717 6923] * Debugging enabled         *
[2020-06-13 09:10:13.717 6923] * DEBUG_DATABASE        YES *
[2020-06-13 09:10:13.717 6923] * DEBUG_NETWORKING      NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_LOCKS           NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_QUERIES         NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_FLAGS           NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_SHMEM           NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_GC              NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_ARP             NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_REGEX           NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_API             NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_OVERTIME        NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_EXTBLOCKED      NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_CAPS            NO  *
[2020-06-13 09:10:13.717 6923] * DEBUG_DNSMASQ_LINES   NO  *
[2020-06-13 09:10:13.718 6923] * DEBUG_VECTORS         NO  *
[2020-06-13 09:10:13.718 6923] * DEBUG_RESOLVER        NO  *
[2020-06-13 09:10:13.718 6923] *****************************
[2020-06-13 09:10:13.718 6923] Finished config file parsing
[2020-06-13 09:10:13.719 6923] dbquery: "SELECT VALUE FROM ftl WHERE id = 0;"
[2020-06-13 09:10:13.721 6923]          ---> Result 6 (int)
[2020-06-13 09:10:13.722 6923] Database version is 6
[2020-06-13 09:10:13.722 6923] Database successfully initialized
[2020-06-13 09:10:13.722 6923] DB_read_queries(): "SELECT * FROM queries WHERE timestamp >= 1591945813"
[2020-06-13 09:10:13.722 6923] New upstream server: 127.0.0.1 (0/128)
[2020-06-13 09:10:13.737 6923] Resizing "/FTL-strings" from 4096 to 8192
[2020-06-13 09:10:13.756 6923] Resizing "/FTL-strings" from 8192 to 12288
[2020-06-13 09:10:13.759 6923] Resizing "/FTL-queries" from 262144 to 524288
[2020-06-13 09:10:13.775 6923] Resizing "/FTL-strings" from 12288 to 16384
[2020-06-13 09:10:13.805 6923] Resizing "/FTL-strings" from 16384 to 20480
[2020-06-13 09:10:13.821 6923] Resizing "/FTL-queries" from 524288 to 786432
[2020-06-13 09:10:13.868 6923] Resizing "/FTL-queries" from 786432 to 1048576
[2020-06-13 09:10:13.893 6923] Imported 13690 queries from the long-term database
[2020-06-13 09:10:13.894 6923]  -> Total DNS queries: 13690
[2020-06-13 09:10:13.894 6923]  -> Cached DNS queries: 5225
[2020-06-13 09:10:13.894 6923]  -> Forwarded DNS queries: 7264
[2020-06-13 09:10:13.894 6923]  -> Blocked DNS queries: 1201
[2020-06-13 09:10:13.894 6923]  -> Unknown DNS queries: 0
[2020-06-13 09:10:13.894 6923]  -> Unique domains: 944
[2020-06-13 09:10:13.894 6923]  -> Unique clients: 12
[2020-06-13 09:10:13.894 6923]  -> Known forward destinations: 1
[2020-06-13 09:10:13.894 6923] Successfully accessed setupVars.conf
[2020-06-13 09:10:13.894 6923] DEBUG: argv[0] = ""
[2020-06-13 09:10:13.894 6923] DEBUG: argv[1] = "-k"
[2020-06-13 09:10:13.909 6925] PID of FTL process: 6925
[2020-06-13 09:10:13.912 6925] Listening on port 4711 for incoming IPv4 telnet connections
[2020-06-13 09:10:13.913 6925] Listening on port 4711 for incoming IPv6 telnet connections
[2020-06-13 09:10:13.913 6925] Listening on Unix socket
[2020-06-13 09:10:13.915 6925] Reloading DNS cache
[2020-06-13 09:10:13.915 6925] Blocking status is enabled
[2020-06-13 09:10:13.916 6925] *****************************
[2020-06-13 09:10:13.916 6925] * Debugging enabled         *
[2020-06-13 09:10:13.916 6925] * DEBUG_DATABASE        YES *
[2020-06-13 09:10:13.916 6925] * DEBUG_NETWORKING      NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_LOCKS           NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_QUERIES         NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_FLAGS           NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_SHMEM           NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_GC              NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_ARP             NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_REGEX           NO  *
[2020-06-13 09:10:13.916 6925] * DEBUG_API             NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_OVERTIME        NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_EXTBLOCKED      NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_CAPS            NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_DNSMASQ_LINES   NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_VECTORS         NO  *
[2020-06-13 09:10:13.917 6925] * DEBUG_RESOLVER        NO  *
[2020-06-13 09:10:13.917 6925] *****************************
[2020-06-13 09:10:13.917 6925] dbquery: "DELETE FROM message;"
[2020-06-13 09:10:13.956 6925]          ---> OK
[2020-06-13 09:10:13.956 6925] gravityDB_open(): Trying to open /etc/pihole/gravity.db in read-only mode
[2020-06-13 09:10:13.957 6925] gravityDB_open(): Setting location for temporary object to MEMORY
[2020-06-13 09:10:13.957 6925] gravityDB_open(): Preparing audit query
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Setting busy timeout to 1000
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Setting busy timeout to zero
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Successfully opened gravity.db
[2020-06-13 09:10:13.960 6925] Querying count of distinct domains in gravity database table vw_gravity
[2020-06-13 09:10:13.961 6925] Querying count of distinct domains in gravity database table vw_regex_blacklist
[2020-06-13 09:10:13.967 6925] Querying count of distinct domains in gravity database table vw_regex_whitelist
[2020-06-13 09:10:13.969 6925] Querying gravity database for client 10.0.10.136 (getting best match)
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.971 6925] Querying gravity database for client 10.0.10.136 (getting groups)
[2020-06-13 09:10:13.974 6925] Querying gravity database for client 10.0.99.192 (getting best match)
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] Querying gravity database for client 10.0.99.192 (getting groups)
[2020-06-13 09:10:13.976 6925] Querying gravity database for client 10.0.1.1 (getting best match)
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] Querying gravity database for client 10.0.1.1 (getting groups)
[2020-06-13 09:10:13.977 6925] Querying gravity database for client 10.0.99.33 (getting best match)
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] Querying gravity database for client 10.0.99.33 (getting groups)
[2020-06-13 09:10:13.978 6925] Querying gravity database for client 10.0.10.64 (getting best match)
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] Querying gravity database for client 10.0.10.64 (getting groups)
[2020-06-13 09:10:13.980 6925] Querying gravity database for client 10.0.40.3 (getting best match)
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] Querying gravity database for client 10.0.40.3 (getting groups)
[2020-06-13 09:10:13.981 6925] Querying gravity database for client 10.0.1.2 (getting best match)
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] Querying gravity database for client 10.0.1.2 (getting groups)
[2020-06-13 09:10:13.982 6925] Querying gravity database for client 10.0.10.190 (getting best match)
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] Querying gravity database for client 10.0.10.190 (getting groups)
[2020-06-13 09:10:13.983 6925] Querying gravity database for client 127.0.0.1 (getting best match)
[2020-06-13 09:10:13.983 6925] SQL: Comparing 127.0.0.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - NO MATCH
[2020-06-13 09:10:13.983 6925] SQL: Comparing 127.0.0.1 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.984 6925] Querying gravity database for client 10.0.10.6 (getting best match)
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] Querying gravity database for client 10.0.10.6 (getting groups)
[2020-06-13 09:10:13.985 6925] Querying gravity database for client 10.0.10.84 (getting best match)
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.84 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.84 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] Querying gravity database for client 10.0.10.84 (getting groups)
[2020-06-13 09:10:13.986 6925] Querying gravity database for client 10.0.10.182 (getting best match)
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] Querying gravity database for client 10.0.10.182 (getting groups)
[2020-06-13 09:10:13.987 6925] Compiled 1 whitelist and 25 blacklist regex filters in 26.7 msec

I think the verbose output and DEBUG_CLIENTS were introduced with this commit and are only availabe in new/mac_clients and will like be not part of 5.1.

You are right, I missed that. The more verbose output will come with Pi-hole v5.2 in this case.