unify ipv4/ipv6 address handling