aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 474075adbde4..514a40b7fc7f 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -471,15 +471,14 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
471 return &rt->u.dst; 471 return &rt->u.dst;
472} 472}
473 473
474static int dccp_v4_send_response(struct sock *sk, struct request_sock *req, 474static int dccp_v4_send_response(struct sock *sk, struct request_sock *req)
475 struct dst_entry *dst)
476{ 475{
477 int err = -1; 476 int err = -1;
478 struct sk_buff *skb; 477 struct sk_buff *skb;
478 struct dst_entry *dst;
479 479
480 /* First, grab a route. */ 480 dst = inet_csk_route_req(sk, req);
481 481 if (dst == NULL)
482 if (dst == NULL && (dst = inet_csk_route_req(sk, req)) == NULL)
483 goto out; 482 goto out;
484 483
485 skb = dccp_make_response(sk, dst, req); 484 skb = dccp_make_response(sk, dst, req);
@@ -620,7 +619,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
620 dreq->dreq_iss = dccp_v4_init_sequence(skb); 619 dreq->dreq_iss = dccp_v4_init_sequence(skb);
621 dreq->dreq_service = service; 620 dreq->dreq_service = service;
622 621
623 if (dccp_v4_send_response(sk, req, NULL)) 622 if (dccp_v4_send_response(sk, req))
624 goto drop_and_free; 623 goto drop_and_free;
625 624
626 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT); 625 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);