diff options
author | Denis V. Lunev <den@openvz.org> | 2008-02-29 14:43:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-29 14:43:03 -0500 |
commit | fd80eb942ad9761f241c9b287b3b9a342b20690d (patch) | |
tree | 664b7a2351dab82419ccf7fa91e6f89ede52065c /net/ipv4 | |
parent | 58fbbed4fbc0094fc808a568fe99a915f85402ee (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')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 14 | ||||
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index b189278c7bc1..c0e0fa03fce1 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -463,7 +463,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
463 | if (time_after_eq(now, req->expires)) { | 463 | if (time_after_eq(now, req->expires)) { |
464 | if ((req->retrans < thresh || | 464 | if ((req->retrans < thresh || |
465 | (inet_rsk(req)->acked && req->retrans < max_retries)) | 465 | (inet_rsk(req)->acked && req->retrans < max_retries)) |
466 | && !req->rsk_ops->rtx_syn_ack(parent, req, NULL)) { | 466 | && !req->rsk_ops->rtx_syn_ack(parent, req)) { |
467 | unsigned long timeo; | 467 | unsigned long timeo; |
468 | 468 | ||
469 | if (req->retrans++ == 0) | 469 | if (req->retrans++ == 0) |
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 | */ |
726 | static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req, | 726 | static 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 | ||
754 | out: | ||
755 | dst_release(dst); | 754 | dst_release(dst); |
756 | return err; | 755 | return err; |
757 | } | 756 | } |
758 | 757 | ||
758 | static 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) { |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index b61b76847ad9..0fdd1db641ac 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -536,7 +536,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
536 | * Enforce "SYN-ACK" according to figure 8, figure 6 | 536 | * Enforce "SYN-ACK" according to figure 8, figure 6 |
537 | * of RFC793, fixed by RFC1122. | 537 | * of RFC793, fixed by RFC1122. |
538 | */ | 538 | */ |
539 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); | 539 | req->rsk_ops->rtx_syn_ack(sk, req); |
540 | return NULL; | 540 | return NULL; |
541 | } | 541 | } |
542 | 542 | ||