[Dnsmasq-discuss] multiple dhcp-options with the same tag
Wink Saville
wink at saville.com
Thu Sep 14 22:56:28 UTC 2023
I've created a fork of dnsmasq on put it on github and in branch wink-test1
<https://github.com/winksaville/dnsmasq-fork/tree/wink-test1>. In that
branch I added a README.md with information and how I "tested" my
hypothesis that dnsmasq does support multiple dhcp-options with the same
tag. Of course I may be full of S***, but it does seem to work and it
doesn't seem to cause any issues.
I'd be glad to make any other changes and, of course, any feedback is
welcome. Also, if I'm correct and "multiple dhcp-options with the same tag"
does work, I'd like to suggest it be documented. I can take a go at it
if you'd like.
-- Wink
On Fri, Sep 8, 2023 at 9:37 PM Wink Saville <wink at saville.com> wrote:
> I'm learning dnsmasq and I'm taking advice from ChatGPT-4, probably a
> bad idea but so far it's given reasonable advice :)
>
> Anyway, in this instance I was asking a question[1] about how to
> configure dnsmasq on OpenWRT.
>
> The first prompt was:
>
> "Using Luci on openwrt is there a way to set a dhcp-option and use it
> on a dhcp-host record?"
>
> It answered correctly that using luci you can't do it but you can do
> it in /etc/dnsmasq.conf and gave an example:
>
> ```
> dhcp-host=00:11:22:33:44:55,set:myOptions,192.168.1.100
> dhcp-option=tag:myOptions,option:dns-server,192.168.1.2
> dhcp-option=tag:myOptions,option:router,192.168.1.1
> ```
>
> My second prompt ends with the question:
>
> "Anyway, your example shows that myOptions is composed of two separate
> dhcp-option's. Are you sure that is legal, can you provide me with a
> link or a quote from the dnsmasg.conf documentation?"
>
> Its response was, as is typical. a long winded yes and it also gave me
> a quote from the documentation. Of course, I couldn't find that quote,
> which is also typical, it lies! Anyway, to cut to the chase I'm
> writing because the technique the bot showed does work, at least it
> seems to work for me on OpenWRT with dnsmasq v2.86. But, as I said I
> don't see in the documentation. Did I just miss it or should I not use
> it or maybe it should be documented?
>
> -- Wink
>
> [1]:https://chat.openai.com/share/cadee80b-4e3e-41e1-b95e-5fd62e799a9a
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230914/1abcfc6d/attachment.htm>
More information about the Dnsmasq-discuss
mailing list