aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.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/dccp/ipv6.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/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 490333d47c7b..1a5e50b90677 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -224,8 +224,7 @@ out:
224} 224}
225 225
226 226
227static int dccp_v6_send_response(struct sock *sk, struct request_sock *req, 227static int dccp_v6_send_response(struct sock *sk, struct request_sock *req)
228 struct dst_entry *dst)
229{ 228{
230 struct inet6_request_sock *ireq6 = inet6_rsk(req); 229 struct inet6_request_sock *ireq6 = inet6_rsk(req);
231 struct ipv6_pinfo *np = inet6_sk(sk); 230 struct ipv6_pinfo *np = inet6_sk(sk);
@@ -234,6 +233,7 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
234 struct in6_addr *final_p = NULL, final; 233 struct in6_addr *final_p = NULL, final;
235 struct flowi fl; 234 struct flowi fl;
236 int err = -1; 235 int err = -1;
236 struct dst_entry *dst;
237 237
238 memset(&fl, 0, sizeof(fl)); 238 memset(&fl, 0, sizeof(fl));
239 fl.proto = IPPROTO_DCCP; 239 fl.proto = IPPROTO_DCCP;
@@ -245,28 +245,26 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
245 fl.fl_ip_sport = inet_sk(sk)->sport; 245 fl.fl_ip_sport = inet_sk(sk)->sport;
246 security_req_classify_flow(req, &fl); 246 security_req_classify_flow(req, &fl);
247 247
248 if (dst == NULL) { 248 opt = np->opt;
249 opt = np->opt;
250 249
251 if (opt != NULL && opt->srcrt != NULL) { 250 if (opt != NULL && opt->srcrt != NULL) {
252 const struct rt0_hdr *rt0 = (struct rt0_hdr *)opt->srcrt; 251 const struct rt0_hdr *rt0 = (struct rt0_hdr *)opt->srcrt;
253 252
254 ipv6_addr_copy(&final, &fl.fl6_dst); 253 ipv6_addr_copy(&final, &fl.fl6_dst);
255 ipv6_addr_copy(&fl.fl6_dst, rt0->addr); 254 ipv6_addr_copy(&fl.fl6_dst, rt0->addr);
256 final_p = &final; 255 final_p = &final;
257 } 256 }
258 257
259 err = ip6_dst_lookup(sk, &dst, &fl); 258 err = ip6_dst_lookup(sk, &dst, &fl);
260 if (err) 259 if (err)
261 goto done; 260 goto done;
262 261
263 if (final_p) 262 if (final_p)
264 ipv6_addr_copy(&fl.fl6_dst, final_p); 263 ipv6_addr_copy(&fl.fl6_dst, final_p);
265 264
266 err = xfrm_lookup(&dst, &fl, sk, 0); 265 err = xfrm_lookup(&dst, &fl, sk, 0);
267 if (err < 0) 266 if (err < 0)
268 goto done; 267 goto done;
269 }
270 268
271 skb = dccp_make_response(sk, dst, req); 269 skb = dccp_make_response(sk, dst, req);
272 if (skb != NULL) { 270 if (skb != NULL) {
@@ -448,7 +446,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
448 dreq->dreq_iss = dccp_v6_init_sequence(skb); 446 dreq->dreq_iss = dccp_v6_init_sequence(skb);
449 dreq->dreq_service = service; 447 dreq->dreq_service = service;
450 448
451 if (dccp_v6_send_response(sk, req, NULL)) 449 if (dccp_v6_send_response(sk, req))
452 goto drop_and_free; 450 goto drop_and_free;
453 451
454 inet6_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT); 452 inet6_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);