find_ip_interface() add IPv6 support

Adds IPv6 support to the find_ip_interface() function as requested in #2797.