aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index b7c0f66e2834..006a3834fbcd 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -390,21 +390,21 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
390 struct ipv6_pinfo *np = inet6_sk(sk); 390 struct ipv6_pinfo *np = inet6_sk(sk);
391 const __be32 service = dccp_hdr_request(skb)->dccph_req_service; 391 const __be32 service = dccp_hdr_request(skb)->dccph_req_service;
392 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb); 392 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);
393 __u8 reset_code = DCCP_RESET_CODE_TOO_BUSY;
394 393
395 if (skb->protocol == htons(ETH_P_IP)) 394 if (skb->protocol == htons(ETH_P_IP))
396 return dccp_v4_conn_request(sk, skb); 395 return dccp_v4_conn_request(sk, skb);
397 396
398 if (!ipv6_unicast_destination(skb)) 397 if (!ipv6_unicast_destination(skb))
399 goto drop; 398 return 0; /* discard, don't send a reset here */
400 399
401 if (dccp_bad_service_code(sk, service)) { 400 if (dccp_bad_service_code(sk, service)) {
402 reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE; 401 dcb->dccpd_reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE;
403 goto drop; 402 goto drop;
404 } 403 }
405 /* 404 /*
406 * There are no SYN attacks on IPv6, yet... 405 * There are no SYN attacks on IPv6, yet...
407 */ 406 */
407 dcb->dccpd_reset_code = DCCP_RESET_CODE_TOO_BUSY;
408 if (inet_csk_reqsk_queue_is_full(sk)) 408 if (inet_csk_reqsk_queue_is_full(sk))
409 goto drop; 409 goto drop;
410 410
@@ -464,7 +464,6 @@ drop_and_free:
464 reqsk_free(req); 464 reqsk_free(req);
465drop: 465drop:
466 DCCP_INC_STATS_BH(DCCP_MIB_ATTEMPTFAILS); 466 DCCP_INC_STATS_BH(DCCP_MIB_ATTEMPTFAILS);
467 dcb->dccpd_reset_code = reset_code;
468 return -1; 467 return -1;
469} 468}
470 469