aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-10-14 14:16:27 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-16 03:52:18 -0400
commitf03f2e154f52fdaa982de7e2c386737679963dc9 (patch)
treef88db80f207233d0b5eef878687bc032f89f9269 /net/dccp
parentef84d8ce5a36d0c4a6454e7e9dff54d19f96a25f (diff)
tcp/dccp: add inet_csk_reqsk_queue_drop_and_put() helper
Let's reduce the confusion about inet_csk_reqsk_queue_drop() : In many cases we also need to release reference on request socket, so add a helper to do this, reducing code size and complexity. Fixes: 4bdc3d66147b ("tcp/dccp: fix behavior of stale SYN_RECV request sockets") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c2
-rw-r--r--net/dccp/ipv6.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 644af510d932..59bc180b02d8 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -828,7 +828,7 @@ lookup:
828 if (likely(sk->sk_state == DCCP_LISTEN)) { 828 if (likely(sk->sk_state == DCCP_LISTEN)) {
829 nsk = dccp_check_req(sk, skb, req); 829 nsk = dccp_check_req(sk, skb, req);
830 } else { 830 } else {
831 inet_csk_reqsk_queue_drop(sk, req); 831 inet_csk_reqsk_queue_drop_and_put(sk, req);
832 goto lookup; 832 goto lookup;
833 } 833 }
834 if (!nsk) { 834 if (!nsk) {
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 68831931b1fe..d9cc731f2619 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -686,7 +686,7 @@ lookup:
686 if (likely(sk->sk_state == DCCP_LISTEN)) { 686 if (likely(sk->sk_state == DCCP_LISTEN)) {
687 nsk = dccp_check_req(sk, skb, req); 687 nsk = dccp_check_req(sk, skb, req);
688 } else { 688 } else {
689 inet_csk_reqsk_queue_drop(sk, req); 689 inet_csk_reqsk_queue_drop_and_put(sk, req);
690 goto lookup; 690 goto lookup;
691 } 691 }
692 if (!nsk) { 692 if (!nsk) {