Return the IP address from add_ip, and added test.