[DCCP]: Notify CCID only after ACK vectors have been processed.
authorAndrea Bittau <a.bittau@cs.ucl.ac.uk>
Tue, 3 Jan 2006 22:26:15 +0000 (14:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Jan 2006 22:26:15 +0000 (14:26 -0800)
The CCID should be notified of packet reception only when a packet is
valid.  Therefore, the ACK vector needs to be processed before
notifying the CCID.  Also, the CCID might need information provided by
the ACK vector.

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/input.c

index cb0f5c9af1ba922d944d7e9f9a568c52f0c12d47..b6cba72b44e84e723b397969c4704a880c671f50 100644 (file)
@@ -492,14 +492,14 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
                if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
                        dccp_event_ack_recv(sk, skb);
 
-               ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
-               ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb);
-
                if (dp->dccps_options.dccpo_send_ack_vector &&
                    dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
                                    DCCP_SKB_CB(skb)->dccpd_seq,
                                    DCCP_ACKVEC_STATE_RECEIVED))
                        goto discard;
+
+               ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
+               ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb);
        }
 
        /*