Jim Alles
2016-02-07 02:04:31 UTC
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
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