On 2016/11/10 00:57, Jeremie Courreges-Anglas wrote: > > The following diff adds support for listening multiple addresses (thus > for dual-stack setups). Multiple "listen on" settings are allowed, the > default is to listen on 0.0.0.0 and :: (currently, only 0.0.0.0). > A single "listen on hostname" line arbitrarily supports up to 16 > addresses. > > It also tweaks the host*() functions so that addresses are used in the > order where they are resolved*. This affects bind addresses, but also > "trap receiver" addresses. So in "trap receiver hostname", if hostname > resolves to both an IPv4 and an IPv6 address, the address that is picked > up respects the order defined by the "family" keyword in resolv.conf. > This *could* break existing setups.
I think this behaviour is completely sane for "trap receiver". If something else is needed, it can be tied to address-family (e.g. "source-address ::" or "source-address 0.0.0.0") or of course a specific address. Using "listen" with a hostname seems odd anyway. Does anyone reading use this? I can't think of anywhere that I'd do so (and would expect it to be fragile if I did). I don't think that's a barrier for your diff. (We could avoid ambiguity by disallowing names there, as is already the case for "source-address", but I don't think it really hurts either way). I've tested it, including with various combinations of name and IP address in "trap receiver" and either v4 or v6 in "source-address" - everything worked as expected and diff reads good to me. OK sthen@
