diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-10 13:08:37 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:03 -0500 |
commit | cf557926f6955b4c3fa55e81fdb3675e752e8eed (patch) | |
tree | 672d24def170058545736be30040ef2249741cc3 /net/dccp/ipv6.c | |
parent | f45b3ec481581f24719d8ab0bc812c02fcedc2bc (diff) |
[DCCP]: tidy up dccp_v{4,6}_conn_request
This is a code simplification to remove reduplicated code
by concentrating and abstracting shared code.
Detailed Changes:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index ed4a50263802..19a4f763099d 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -427,7 +427,6 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) | |||
427 | 427 | ||
428 | static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | 428 | static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) |
429 | { | 429 | { |
430 | struct dccp_sock dp; | ||
431 | struct request_sock *req; | 430 | struct request_sock *req; |
432 | struct dccp_request_sock *dreq; | 431 | struct dccp_request_sock *dreq; |
433 | struct inet6_request_sock *ireq6; | 432 | struct inet6_request_sock *ireq6; |
@@ -459,9 +458,10 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
459 | if (req == NULL) | 458 | if (req == NULL) |
460 | goto drop; | 459 | goto drop; |
461 | 460 | ||
462 | /* FIXME: process options */ | 461 | if (dccp_parse_options(sk, skb)) |
462 | goto drop_and_free; | ||
463 | 463 | ||
464 | dccp_openreq_init(req, &dp, skb); | 464 | dccp_reqsk_init(req, skb); |
465 | 465 | ||
466 | if (security_inet_conn_request(sk, skb, req)) | 466 | if (security_inet_conn_request(sk, skb, req)) |
467 | goto drop_and_free; | 467 | goto drop_and_free; |
@@ -469,7 +469,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
469 | ireq6 = inet6_rsk(req); | 469 | ireq6 = inet6_rsk(req); |
470 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); | 470 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); |
471 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); | 471 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); |
472 | req->rcv_wnd = dccp_feat_default_sequence_window; | ||
473 | ireq6->pktopts = NULL; | 472 | ireq6->pktopts = NULL; |
474 | 473 | ||
475 | if (ipv6_opt_accepted(sk, skb) || | 474 | if (ipv6_opt_accepted(sk, skb) || |