aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-02-29 14:43:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-29 14:43:03 -0500
commitfd80eb942ad9761f241c9b287b3b9a342b20690d (patch)
tree664b7a2351dab82419ccf7fa91e6f89ede52065c /net/ipv4/tcp_ipv4.c
parent58fbbed4fbc0094fc808a568fe99a915f85402ee (diff)
[INET]: Remove struct dst_entry *dst from request_sock_ops.rtx_syn_ack.
It looks like dst parameter is used in this API due to historical reasons. Actually, it is really used in the direct call to tcp_v4_send_synack only. So, create a wrapper for tcp_v4_send_synack and remove dst from rtx_syn_ack. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 256032a41069..3b26f9586dcb 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -723,8 +723,8 @@ static void tcp_v4_reqsk_send_ack(struct sk_buff *skb,
723 * This still operates on a request_sock only, not on a big 723 * This still operates on a request_sock only, not on a big
724 * socket. 724 * socket.
725 */ 725 */
726static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req, 726static int __tcp_v4_send_synack(struct sock *sk, struct request_sock *req,
727 struct dst_entry *dst) 727 struct dst_entry *dst)
728{ 728{
729 const struct inet_request_sock *ireq = inet_rsk(req); 729 const struct inet_request_sock *ireq = inet_rsk(req);
730 int err = -1; 730 int err = -1;
@@ -732,7 +732,7 @@ static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req,
732 732
733 /* First, grab a route. */ 733 /* First, grab a route. */
734 if (!dst && (dst = inet_csk_route_req(sk, req)) == NULL) 734 if (!dst && (dst = inet_csk_route_req(sk, req)) == NULL)
735 goto out; 735 return -1;
736 736
737 skb = tcp_make_synack(sk, dst, req); 737 skb = tcp_make_synack(sk, dst, req);
738 738
@@ -751,11 +751,15 @@ static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req,
751 err = net_xmit_eval(err); 751 err = net_xmit_eval(err);
752 } 752 }
753 753
754out:
755 dst_release(dst); 754 dst_release(dst);
756 return err; 755 return err;
757} 756}
758 757
758static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req)
759{
760 return __tcp_v4_send_synack(sk, req, NULL);
761}
762
759/* 763/*
760 * IPv4 request_sock destructor. 764 * IPv4 request_sock destructor.
761 */ 765 */
@@ -1380,7 +1384,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
1380 } 1384 }
1381 tcp_rsk(req)->snt_isn = isn; 1385 tcp_rsk(req)->snt_isn = isn;
1382 1386
1383 if (tcp_v4_send_synack(sk, req, dst)) 1387 if (__tcp_v4_send_synack(sk, req, dst))
1384 goto drop_and_free; 1388 goto drop_and_free;
1385 1389
1386 if (want_cookie) { 1390 if (want_cookie) {