aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 08:59:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 08:59:21 +0200
commit9594408763d439287742d5582842db6a476bbd71 (patch)
tree2a0787dae55a3372108837cc8ce3261beac6ff46 /net/ipv6/tcp_ipv6.c
parenttty: pty: Add a blank line after declarations (diff)
parentLinux 5.12-rc6 (diff)
downloadlinux-dev-9594408763d439287742d5582842db6a476bbd71.tar.xz
linux-dev-9594408763d439287742d5582842db6a476bbd71.zip
Merge 5.12-rc6 into tty-next
We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index bd44ded7e50c..d0f007741e8e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1175,6 +1175,11 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
if (!ipv6_unicast_destination(skb))
goto drop;
+ if (ipv6_addr_v4mapped(&ipv6_hdr(skb)->saddr)) {
+ __IP6_INC_STATS(sock_net(sk), NULL, IPSTATS_MIB_INHDRERRORS);
+ return 0;
+ }
+
return tcp_conn_request(&tcp6_request_sock_ops,
&tcp_request_sock_ipv6_ops, sk, skb);