ipaddr: make sure that both IPv4 and IPv6 types implement some interfaces