On 2021/08/09 20:55, Martijn van Duren wrote: > On Mon, 2021-08-09 at 11:57 +0200, Martijn van Duren wrote: > > > > This diff fixes all of the above: > > - Allow any to be used resolving to 0.0.0.0 and :: > > - Set SO_REUSEADDR on sockets, so we can listen on both any and > > localhost > > - Document that we listen on any by default
I've discovered a problem with this, if you have "family inet4" or "family inet6" in resolv.conf then startup fails, either with the implicit listen: snmpd: Unexpected resolving of :: or with explicit e.g. "listen on any snmpv3": /etc/snmpd.conf:3: invalid address: any Config-based workaround is e.g. "listen on 0.0.0.0 snmpv3" Should host() use a specific ai_family instead of PF_UNSPEC where we already know that it's a v4 or v6 address? Or just do like httpd/parse.y where host() tries v4, then v6 if that fails, then dns?