(#16668) Simpify logic for enumerating nics

Previously, we were making one pass through the ordered list of nics,
selecting nics that had at least one IPv4 or IPv6 IP address, and then making
a second pass to find the IP address.

This commit simplifies it so that we only make one pass.