summaryrefslogtreecommitdiff
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 08:43:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 08:43:50 +0200
commit422d2245136a2c49550dc83ca9735dd4d8ea71f7 (patch)
tree8dc42f707efcce275baba950be2076ec830f52f4 /net/dccp/ipv6.c
parentb0077b4b085f636e5f8a1fd9cd6e568907471b24 (diff)
parente49d033bddf5b565044e2abe4241353959bc9120 (diff)
Merge 5.12-rc6 into char-misc-next
We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 1f73603913f5..2be5c69824f9 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -319,6 +319,11 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
if (!ipv6_unicast_destination(skb))
return 0; /* discard, don't send a reset here */
+ if (ipv6_addr_v4mapped(&ipv6_hdr(skb)->saddr)) {
+ __IP6_INC_STATS(sock_net(sk), NULL, IPSTATS_MIB_INHDRERRORS);
+ return 0;
+ }
+
if (dccp_bad_service_code(sk, service)) {
dcb->dccpd_reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE;
goto drop;