On 08/03/2024 08:07, Stefano Brivio wrote:
Possibly by making add_dns[46]() accept localhost addresses if
(dns_match && no_map_gw)?  
What do you mean by "accept"? It already sets .dns_host, no matter
what. I don't think we should add loopback addresses to the list we
advertise if c->no_map_gw, because they can't be reached anyway.

Another alternative would be to automatically advertise the address
passed by --dns-forward. But the user can already specify that via
--dns, so we'd be actually losing functionality.  
Ah.. I forgot that.  It seems weird to me that these are set
separately.  I guess that approach doesn't quite work.

What about your patch, plus a new explicit check about whether we have
something we can advertise to the guest (whether it comes from
resolv.conf or from --dns)?
It makes sense, yes. Actually, right now, to unblock Podman with that
issue, I would go ahead with my patch, then think of an appropriate
text for the other warning.
It doesn't really block Podman. I will send PRs later to use --dns-forward by default, as of of now I haven't enabled show warnings by default because there is no new version with my pasta log fixes yet but that is ok as it really isn't urgent to enable that.