code: func chooseHostInterfaceFromRoute(routes []Route, nw networkInterfacer) (net.IP, error) {
  	for _, family := range []AddressFamily{familyIPv4, familyIPv6} {
  		klog.V(4).Infof("Looking for default routes with IPv%d addresses", uint(family))
  		for _, route := range routes {
  			if route.Family != family {
  				continue
  			}
  			klog.V(4).Infof("Default route transits interface %q", route.Interface)
  			finalIP, err := getIPFromInterface(route.Interface, family, nw)
  			if err != nil {
  				return nil, err
  			}
  			if finalIP != nil {
  				klog.V(4).Infof("Found active IP %v ", finalIP)
  				return finalIP, nil
  			}
  		}
  	}
  	klog.V(4).Infof("No active IP found by looking at default routes")
  	return nil, fmt.Errorf("unable to select an IP from default routes.")
  }
docs: // chooseHostInterfaceFromRoute cycles through each default route provided, looking for a
  // global IP address from the interface for the route. Will first look all each IPv4 route for
  // an IPv4 IP, and then will look at each IPv6 route for an IPv6 IP.