[Dnsmasq-discuss] dhcp-name-match ?
james at nurealm.net
Fri Nov 15 03:53:07 GMT 2019
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.
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.
More information about the Dnsmasq-discuss