On 09.05.2023 18:40, Per Jessen wrote:
IOW, you want to keep your static config for /etc/resolv.conf, but you also want the dynamic info (from dhcp or RA) to include in dnsmasq.conf. I have not done a comprehensive search, but I don't see that wicked writes any such file for that use.
Of course it does (strictly speaking, it calls netconfig which writes this file). It is /var/run/dnsmasq-forwarders.conf if you set NETCONFIG_DNS_FORWARDER=dnsmasq. What netconfig *also* does in this case (and this seems to be poorly/not documented) is to *also* update /etc/resolv.conf. It does add 127.0.0.1 as the first entry, but it also puts there the same upstream name servers as in /var/run/dnsmasq-forwarders.conf. There is no way to stop netconfig doing it as long as /etc/resolv.conf remains under control of netconfig. One would need to manage it manually (which should not be a problem as long as it has permanent entry 127.0.0.1). But I believe we already suggested it from the very beginning and this suggestion was rejected for some reasons.
I don't understand why you refuse to use a regular dynamic config, such as what I showed you earlier, but I see wicked has some scripting options, maybe you can build some bespoke solution.
When choosing between relatively good documented netconfig and completely undocumented wicked xml configuration I would certainly prefer netconfig. Although of course it is possible to simply model your own extension on how netconfig extension works, it is not overly complicated.