WiP: handle both ipv4 and ipv6