flow_get_tunnel_netdev(struct flow_tnl *tunnel)
{
    char iface[IFNAMSIZ];
    struct in6_addr ip6;
    struct in6_addr gw;

    if (tunnel->ip_src) {
        in6_addr_set_mapped_ipv4(&ip6, tunnel->ip_src);
    } else if (ipv6_addr_is_set(&tunnel->ipv6_src)) {
        ip6 = tunnel->ipv6_src;
    } else {
        return NULL;
    }

    if (!ovs_router_lookup(0, &ip6, iface, NULL, &gw)) {
        return NULL;
    }

    return netdev_from_name(iface);
}
flow_get_tunnel_netdev(struct flow_tnl *tunnel)
{
    char iface[IFNAMSIZ];
    struct in6_addr ip6;
    struct in6_addr gw;

    if (tunnel->ip_src) {
        in6_addr_set_mapped_ipv4(&ip6, tunnel->ip_src);
    } else if (ipv6_addr_is_set(&tunnel->ipv6_src)) {
        ip6 = tunnel->ipv6_src;
    } else {
        return NULL;
    }

    if (!ovs_router_lookup(0, &ip6, iface, NULL, &gw)) {
        return NULL;
    }

    return netdev_from_name(iface);
}