[Dnsmasq-discuss] spaces in hostnames

Jim Alles kb3tbx at gmail.com
Sun Feb 7 02:04:31 GMT 2016


Simon, Sir:

in 2007 @
https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg01532.html

you said:

"Hmm, an interesting can of worms. My first reaction to this was "it's

not a problem, spaces are not legal in hostnames and should never get
there", but when I looked at the code, two things are apparent.

1) Hostnames in --dhcp-host lines are not ever checked for legality:
that's a bug. They are checked elsewhere (/etc/ethers, /etc/hosts, DHCP
client supplied names....)

2) The "is this hostname legal" checker actually allows spaces. This was
a change made to allow SRV records for DNS-SD, which have to have
spaces. The implications for the DHCP lease system were missed.

My inclination is to re-impose the ban on spaces on DHCP hostnames.
Richard, would that cause you problems? Presumably you have at least one
name with a space in it, is that "real" or from an all-possibilites test?

If spaces in hostnames are to be allowed, they should be escaped somehow.
​"


May I ask ​what the resolution of this issue was? I see no reference
in recent changelogs.


 And  methinks the GUI of a router that I use should have an input
validation to prevent spaces from being entered.


Is there a list or reference to legal hostname characters in an
"addn-hosts=" file for dnsmasq.conf?


My gratitude to you for being here!


Jim Alles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160206/6c990333/attachment.html>


More information about the Dnsmasq-discuss mailing list