mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Allow hostnames to start with a number.
This commit is contained in:
committed by
Simon Kelley
parent
b4b9308079
commit
d859ca2f9b
@@ -151,14 +151,13 @@ int legal_hostname(char *name)
|
||||
/* check for legal char a-z A-Z 0-9 - _ . */
|
||||
{
|
||||
if ((c >= 'A' && c <= 'Z') ||
|
||||
(c >= 'a' && c <= 'z'))
|
||||
(c >= 'a' && c <= 'z') ||
|
||||
(c >= '0' && c <= '9'))
|
||||
continue;
|
||||
|
||||
if (!first &&
|
||||
((c >= '0' && c <= '9') ||
|
||||
c == '-' || c == '_'))
|
||||
if (!first && (c == '-' || c == '_'))
|
||||
continue;
|
||||
|
||||
|
||||
/* end of hostname part */
|
||||
if (c == '.')
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user