diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index eed9231c90ad..8553788ce65b 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -58,6 +58,7 @@ #include #include #include +#include static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -1025,11 +1026,14 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk, } } #endif +#if defined(CONFIG_ANDROID_VERSION) && CONFIG_ANDROID_VERSION < ANDROID_VERSION(8, 0, 0, 0) +#else if (ipv6_addr_v4mapped(&fl6->saddr) && !(ipv6_addr_v4mapped(&fl6->daddr) || ipv6_addr_any(&fl6->daddr))) { err = -EAFNOSUPPORT; goto out_err_release; } +#endif return 0;