On 17.11.21 15:50, Jerry Xiao wrote:
It's unnecessary and inefficient to rebuild a config file that long
every time you connect to a new wifi network,

well, you have used default and "default" server, where the "default" was
not really default, because only configured domains were pointed to it.

yes, you used undocumented feature of dnsmasq that gort removed.

what you need is some kind of "server-alias", I guess you are welcome to
provide a patch or hope someone will make it for you.

and btw this is also bad for your ssd.

have you never heard of tmpfs?

alternatively, you can use multiple dnsmasq instances, one forwarding to
default server and only named domains to the second instance.  The second
instance will forward to dhcp-provided nameserver(s).

On 11.11.21 15:12, Jerry Xiao wrote:
> I was using dnsmasq 2.85 to do all of this, until it is upgraded
> and no
> longer works. I'm not quite sure if it is an unintentional feature
> on
> the old version 2.85, in option.c there is a piece of clearly
> intentional code to deal with the sharp inside something like
> "server=/#/1.1.1.1"
>
> if (strcmp(arg, "#") == 0)
>  domain = "";
>
> this also sets the SERV_HAS_DOMAIN server flag below.
> I remember seeing the feature being discussed in the mailing list,
> though the thread is not that easy to find.
>
> I spent some more time digging into the code base, only to find out
> that there is no "easy" way to implement this in the new version
> because of the new sorting algorithm used for choosing servers, the
> vastly changed server flags (SERV_HAS_DOMAIN, along with some other
> flags, are removed) and the fact that server flags and query flags
> are
> already full, idk if the upstream is willing to merge my changes if
> the
> size of the flags are enarged.
>
> Worst case I just replace dnsmasq with systemd-networkd, but before
> that I'd like to know if there's still other ways to implement
> this.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #98652: Operation completed successfully.

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to