diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 2312b9f4d7af..44f6e17e105f 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -568,17 +568,14 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
568 | struct dccp_request_sock *dreq; | 568 | struct dccp_request_sock *dreq; |
569 | const __be32 service = dccp_hdr_request(skb)->dccph_req_service; | 569 | const __be32 service = dccp_hdr_request(skb)->dccph_req_service; |
570 | struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb); | 570 | struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb); |
571 | __u8 reset_code = DCCP_RESET_CODE_TOO_BUSY; | ||
572 | 571 | ||
573 | /* Never answer to DCCP_PKT_REQUESTs send to broadcast or multicast */ | 572 | /* Never answer to DCCP_PKT_REQUESTs send to broadcast or multicast */ |
574 | if (((struct rtable *)skb->dst)->rt_flags & | 573 | if (((struct rtable *)skb->dst)->rt_flags & |
575 | (RTCF_BROADCAST | RTCF_MULTICAST)) { | 574 | (RTCF_BROADCAST | RTCF_MULTICAST)) |
576 | reset_code = DCCP_RESET_CODE_NO_CONNECTION; | 575 | return 0; /* discard, don't send a reset here */ |
577 | goto drop; | ||
578 | } | ||
579 | 576 | ||
580 | if (dccp_bad_service_code(sk, service)) { | 577 | if (dccp_bad_service_code(sk, service)) { |
581 | reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE; | 578 | dcb->dccpd_reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE; |
582 | goto drop; | 579 | goto drop; |
583 | } | 580 | } |
584 | /* | 581 | /* |
@@ -586,6 +583,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
586 | * limitations, they conserve resources and peer is | 583 | * limitations, they conserve resources and peer is |
587 | * evidently real one. | 584 | * evidently real one. |
588 | */ | 585 | */ |
586 | dcb->dccpd_reset_code = DCCP_RESET_CODE_TOO_BUSY; | ||
589 | if (inet_csk_reqsk_queue_is_full(sk)) | 587 | if (inet_csk_reqsk_queue_is_full(sk)) |
590 | goto drop; | 588 | goto drop; |
591 | 589 | ||
@@ -638,7 +636,6 @@ drop_and_free: | |||
638 | reqsk_free(req); | 636 | reqsk_free(req); |
639 | drop: | 637 | drop: |
640 | DCCP_INC_STATS_BH(DCCP_MIB_ATTEMPTFAILS); | 638 | DCCP_INC_STATS_BH(DCCP_MIB_ATTEMPTFAILS); |
641 | dcb->dccpd_reset_code = reset_code; | ||
642 | return -1; | 639 | return -1; |
643 | } | 640 | } |
644 | 641 | ||