mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Allow hostnames to start with a number.
This commit is contained in:
committed by
Simon Kelley
parent
b4b9308079
commit
d859ca2f9b
@@ -60,6 +60,9 @@ version 2.67
|
|||||||
AudioCodes Voice Gateways doing streaming writes to flash.
|
AudioCodes Voice Gateways doing streaming writes to flash.
|
||||||
Thanks to Damian Kaczkowski for spotting the problem.
|
Thanks to Damian Kaczkowski for spotting the problem.
|
||||||
|
|
||||||
|
Allow hostnames to start with a number, as allowed in
|
||||||
|
RFC-1123. Thanks to Kyle Mestery for the patch.
|
||||||
|
|
||||||
|
|
||||||
version 2.66
|
version 2.66
|
||||||
Add the ability to act as an authoritative DNS
|
Add the ability to act as an authoritative DNS
|
||||||
|
|||||||
@@ -151,12 +151,11 @@ int legal_hostname(char *name)
|
|||||||
/* check for legal char a-z A-Z 0-9 - _ . */
|
/* check for legal char a-z A-Z 0-9 - _ . */
|
||||||
{
|
{
|
||||||
if ((c >= 'A' && c <= 'Z') ||
|
if ((c >= 'A' && c <= 'Z') ||
|
||||||
(c >= 'a' && c <= 'z'))
|
(c >= 'a' && c <= 'z') ||
|
||||||
|
(c >= '0' && c <= '9'))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!first &&
|
if (!first && (c == '-' || c == '_'))
|
||||||
((c >= '0' && c <= '9') ||
|
|
||||||
c == '-' || c == '_'))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* end of hostname part */
|
/* end of hostname part */
|
||||||
|
|||||||
Reference in New Issue
Block a user