From: Andrea Bittau Date: Tue, 3 Jan 2006 22:25:49 +0000 (-0800) Subject: [DCCP]: Send an ACK vector when ACKing a response packet X-Git-Tag: v2.6.16-rc1~474^2~22^2~9^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e377202d2c968dde8efd6121d94c7f0a77787aa;p=linux-2.6 [DCCP]: Send an ACK vector when ACKing a response packet If ACK vectors are used, each packet with an ACK should contain an ACK vector. The only exception currently is response packets. It probably is not a good idea to store ACK vector state before the connection is completed (to help protect from syn floods). Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- diff --git a/net/dccp/input.c b/net/dccp/input.c index 5e312b04a7..cb0f5c9af1 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c @@ -300,6 +300,12 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk, goto out_invalid_packet; } + 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 out_invalid_packet; /* FIXME: change error code */ + dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq; dccp_update_gsr(sk, dp->dccps_isr); /*