diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/input.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c index f91cf5ada306..7d230d14ce22 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -160,13 +160,15 @@ static void dccp_rcv_reset(struct sock *sk, struct sk_buff *skb) | |||
160 | dccp_time_wait(sk, DCCP_TIME_WAIT, 0); | 160 | dccp_time_wait(sk, DCCP_TIME_WAIT, 0); |
161 | } | 161 | } |
162 | 162 | ||
163 | static void dccp_event_ack_recv(struct sock *sk, struct sk_buff *skb) | 163 | static void dccp_handle_ackvec_processing(struct sock *sk, struct sk_buff *skb) |
164 | { | 164 | { |
165 | struct dccp_sock *dp = dccp_sk(sk); | 165 | struct dccp_ackvec *av = dccp_sk(sk)->dccps_hc_rx_ackvec; |
166 | 166 | ||
167 | if (dp->dccps_hc_rx_ackvec != NULL) | 167 | if (av == NULL) |
168 | dccp_ackvec_clear_state(dp->dccps_hc_rx_ackvec, | 168 | return; |
169 | DCCP_SKB_CB(skb)->dccpd_ack_seq); | 169 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) |
170 | dccp_ackvec_clear_state(av, DCCP_SKB_CB(skb)->dccpd_ack_seq); | ||
171 | dccp_ackvec_input(av, skb); | ||
170 | } | 172 | } |
171 | 173 | ||
172 | static void dccp_deliver_input_to_ccids(struct sock *sk, struct sk_buff *skb) | 174 | static void dccp_deliver_input_to_ccids(struct sock *sk, struct sk_buff *skb) |
@@ -365,21 +367,13 @@ discard: | |||
365 | int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, | 367 | int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, |
366 | const struct dccp_hdr *dh, const unsigned len) | 368 | const struct dccp_hdr *dh, const unsigned len) |
367 | { | 369 | { |
368 | struct dccp_sock *dp = dccp_sk(sk); | ||
369 | |||
370 | if (dccp_check_seqno(sk, skb)) | 370 | if (dccp_check_seqno(sk, skb)) |
371 | goto discard; | 371 | goto discard; |
372 | 372 | ||
373 | if (dccp_parse_options(sk, NULL, skb)) | 373 | if (dccp_parse_options(sk, NULL, skb)) |
374 | return 1; | 374 | return 1; |
375 | 375 | ||
376 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) | 376 | dccp_handle_ackvec_processing(sk, skb); |
377 | dccp_event_ack_recv(sk, skb); | ||
378 | |||
379 | if (dp->dccps_hc_rx_ackvec != NULL && | ||
380 | dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk, | ||
381 | DCCP_SKB_CB(skb)->dccpd_seq, DCCPAV_RECEIVED)) | ||
382 | goto discard; | ||
383 | dccp_deliver_input_to_ccids(sk, skb); | 377 | dccp_deliver_input_to_ccids(sk, skb); |
384 | 378 | ||
385 | return __dccp_rcv_established(sk, skb, dh, len); | 379 | return __dccp_rcv_established(sk, skb, dh, len); |
@@ -631,14 +625,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
631 | if (dccp_parse_options(sk, NULL, skb)) | 625 | if (dccp_parse_options(sk, NULL, skb)) |
632 | return 1; | 626 | return 1; |
633 | 627 | ||
634 | if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) | 628 | dccp_handle_ackvec_processing(sk, skb); |
635 | dccp_event_ack_recv(sk, skb); | ||
636 | |||
637 | if (dp->dccps_hc_rx_ackvec != NULL && | ||
638 | dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk, | ||
639 | DCCP_SKB_CB(skb)->dccpd_seq, DCCPAV_RECEIVED)) | ||
640 | goto discard; | ||
641 | |||
642 | dccp_deliver_input_to_ccids(sk, skb); | 629 | dccp_deliver_input_to_ccids(sk, skb); |
643 | } | 630 | } |
644 | 631 | ||