On 05/12/2019 22:48, Simon Kelley wrote: > On 15/11/2019 03:53, James Feeney wrote: >> Hey Simon >> >> On 11/8/19 4:36 PM, Simon Kelley wrote: >>> If there's no name configured in the dnsmasq configuration, then the >>> client-provided name will be matched. However if there is a name >>> configured in the dnsmasq configuration, selected by MAC address or >>> client-id, then that will be used in preference. To an extent, what the >>> client chooses to use as its name is secondary: dnsmasq determines the >>> client's name so that it can be inserted into the DNS. If the >>> configuration specifies that name, then that's what dnsmasq puts in the >>> DNS, and it's what dnsmasq uses with dhcp-name-match. >> >> Hmm - ok. Still, it seems to me that that behavior is not an "intuitive" >> interpretation of the option "dhcp-name-match", such that that explanation >> should definitely be added to the dnsmasq man page, at >> "--dhcp-name-match=...". >> >> In particular, it should be made clear that the client-provided name will >> *not* be matched under some circumstances. In other words, sometimes it >> will "work", and sometimes it will not, and the administrator should not >> expect consistency. >> >> It should also be made clear that the client's idea of its own host name has >> nothing to do with the host name that dnsmasq will use in its own DNS >> registry, and that this will be most noticeable when the client chooses to >> ignore the host name offered to the client by dnsmasq. > > This behaviour (name configured in dnsmasq trumps name supplied by > client) is of very long standing, and could not, in all conscience, be > changed now it would break too many existing configurations. It's > pretty difficult to see how it would be confusing: you configure dnsmasq > to give the host with MAC address <x> name <y> and it does it. It also > returns that name on DHCP replies to the host, so it can use it too, if > so configured. > >> >> To be clear, I disagree with your approach. I would prefer that the >> "tagging" function simply be intuitively predictable and consistent, and >> *independent* of how dnsmasq determines the client's name and then inserts >> that name into the DNS registry. > > I may have to eat my words here. Reading the existing man page shows > that matching the client-supplied name was probably the original > intention, and the two examples of how it could be used are certainly > useful, and require that the name matched is the one supplied by the client. > > Quote: "Set the tag if the given name is supplied by a dhcp client. > There may be a single trailing wildcard *, which has the usual meaning. > Combined with dhcp-ignore or dhcp-ignore-names this gives the ability to > ignore certain clients by name, or disallow certain hostnames from being > claimed by a client." > > Looks like I have to revise my fix...... > > > Cheers, > > Simon. >
Revised fix committed. Simon. _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss