diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index bf692c1c116f..e08e7688a263 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -183,7 +183,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk, | |||
183 | dccp_sync_mss(sk, mtu); | 183 | dccp_sync_mss(sk, mtu); |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * From: draft-ietf-dccp-spec-11.txt | 186 | * From RFC 4340, sec. 14.1: |
187 | * | 187 | * |
188 | * DCCP-Sync packets are the best choice for upward | 188 | * DCCP-Sync packets are the best choice for upward |
189 | * probing, since DCCP-Sync probes do not risk application | 189 | * probing, since DCCP-Sync probes do not risk application |
@@ -311,7 +311,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) | |||
311 | } | 311 | } |
312 | 312 | ||
313 | if (sk->sk_state == DCCP_TIME_WAIT) { | 313 | if (sk->sk_state == DCCP_TIME_WAIT) { |
314 | inet_twsk_put((struct inet_timewait_sock *)sk); | 314 | inet_twsk_put(inet_twsk(sk)); |
315 | return; | 315 | return; |
316 | } | 316 | } |
317 | 317 | ||
@@ -449,6 +449,8 @@ static inline u64 dccp_v4_init_sequence(const struct sock *sk, | |||
449 | dccp_hdr(skb)->dccph_sport); | 449 | dccp_hdr(skb)->dccph_sport); |
450 | } | 450 | } |
451 | 451 | ||
452 | static struct request_sock_ops dccp_request_sock_ops; | ||
453 | |||
452 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | 454 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) |
453 | { | 455 | { |
454 | struct inet_request_sock *ireq; | 456 | struct inet_request_sock *ireq; |
@@ -489,7 +491,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
489 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | 491 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) |
490 | goto drop; | 492 | goto drop; |
491 | 493 | ||
492 | req = reqsk_alloc(sk->sk_prot->rsk_prot); | 494 | req = reqsk_alloc(&dccp_request_sock_ops); |
493 | if (req == NULL) | 495 | if (req == NULL) |
494 | goto drop; | 496 | goto drop; |
495 | 497 | ||
@@ -614,7 +616,7 @@ static struct sock *dccp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
614 | bh_lock_sock(nsk); | 616 | bh_lock_sock(nsk); |
615 | return nsk; | 617 | return nsk; |
616 | } | 618 | } |
617 | inet_twsk_put((struct inet_timewait_sock *)nsk); | 619 | inet_twsk_put(inet_twsk(nsk)); |
618 | return NULL; | 620 | return NULL; |
619 | } | 621 | } |
620 | 622 | ||
@@ -731,7 +733,7 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) | |||
731 | dccp_hdr_reset(skb)->dccph_reset_code = | 733 | dccp_hdr_reset(skb)->dccph_reset_code = |
732 | DCCP_SKB_CB(rxskb)->dccpd_reset_code; | 734 | DCCP_SKB_CB(rxskb)->dccpd_reset_code; |
733 | 735 | ||
734 | /* See "8.3.1. Abnormal Termination" in draft-ietf-dccp-spec-11 */ | 736 | /* See "8.3.1. Abnormal Termination" in RFC 4340 */ |
735 | seqno = 0; | 737 | seqno = 0; |
736 | if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) | 738 | if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) |
737 | dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); | 739 | dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); |
@@ -980,7 +982,7 @@ discard_and_relse: | |||
980 | goto discard_it; | 982 | goto discard_it; |
981 | 983 | ||
982 | do_time_wait: | 984 | do_time_wait: |
983 | inet_twsk_put((struct inet_timewait_sock *)sk); | 985 | inet_twsk_put(inet_twsk(sk)); |
984 | goto no_dccp_socket; | 986 | goto no_dccp_socket; |
985 | } | 987 | } |
986 | 988 | ||