Handle ipv4/ipv6 adresses in local_ip.