added return status for ipv4 and ipv6