mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
ipv6: ip6_output: fix for Android 7.1 CTS
After commit 23287661af ("ipv6: Inhibit IPv4-mapped src address on the wire.")
Android failed to pass DatagramSocketTest#test_getRemoteSocketAddress:
fail: java.net.ConnectException: Address family not supported by protocol
Android side has patch "Fix DatagramSocketTest#test_getRemoteSocketAddress".
Unfortunately, which may not merge to Android 7.1 branch, so we have to fixes
it on kernel side.
Change-Id: I7444c7636f02485abf6ddd4d7b9cad1f4e6d06e1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
e9684a4a18
commit
8ace8303d0
|
|
@ -58,6 +58,7 @@
|
|||
#include <linux/mroute6.h>
|
||||
#include <net/l3mdev.h>
|
||||
#include <net/lwtunnel.h>
|
||||
#include <soc/rockchip/android-version.h>
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user