I deleted my previous post because after looking at the source code it's more nuanced than I wrote. But at the end of the day the end result is probably the same.
Heh. I was just about to point out the same, after looking at the source..
In wanduck.c, do_dns_detect function:
asuswrt-merlin.ng/release/src/router/rc/wanduck.c at 1f969b47cdaca08ee538b644db8336669ba30c0c · RMerl/asuswrt-merlin.ng
Third party firmware for Asus routers (newer codebase) - RMerl/asuswrt-merlin.ng
github.com
Code:
/* Return values:
-1: error or disable
0: dns probe has failed
1: dns probe ok
*/
...
/* Check for valid domain to avoid shell escaping */
if (!is_valid_domainname(host) || *content == '\0')
return -1;
So invalid hostname should return false, not "probe ok". However digging further, is_valid_domainname:
Code:
int is_valid_domainname(const char *name)
{
const char *p;
int c;
if (!name)
return 0;
for (p = name; (c = *p); p++) {
if (((c | 0x20) < 'a' || (c | 0x20) > 'z') &&
((c < '0' || c > '9')) &&
(c != '.' && c != '-' && c != '_'))
return 0;
}
return p - name;
}
This just checks that domainname has only alphanumeric characters or dot, hyphen or underscore.. 8.8.8.8 will pass the test.
Then it looks like the code just carries on asking DNS about 8.8.8.8. Querying DNS about IP address might be stupid but it is not an error, and it will test that connection to DNS server works.
Code:
admin@gw:/tmp/home/root# nslookup 8.8.8.8
Server: 45.90.28.153
Address 1: 45.90.28.153 dns1.nextdns.io
Name: 8.8.8.8
Address 1: 8.8.8.8 dns.google