<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Simon, Sir:</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">in 2007 @ <a href="https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg01532.html">https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg01532.html</a></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">you said:</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">"<span style="color:rgb(0,0,0);font-family:courier,'courier new',monospace;font-size:14px;line-height:19.6px;white-space:pre-wrap">Hmm, an interesting can of worms. My first reaction to this was "it's</span></div><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px">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.<div class="gmail_default" style="font-family:georgia,serif;display:inline">​"</div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline">May I ask ​what the resolution of this issue was? I see no reference in recent changelogs.</div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"> And  methinks the GUI of a router that I use should have an input validation to prevent spaces from being entered.</div><br></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline">Is there a list or reference to legal hostname characters in an "addn-hosts=" file for dnsmasq.conf?</div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline">My gratitude to you for being here!</div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></pre><pre style="font-family:courier,'courier new',monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19.6px"><div class="gmail_default" style="font-family:georgia,serif;display:inline">Jim Alles</div></pre></div>