From: Wei Yongjun Date: Sat, 26 Jul 2008 10:59:10 +0000 (+0100) Subject: dccp: Fix sequence number check for ICMPv4 packets X-Git-Tag: v2.6.27-rc1~33^2~1^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68f0866f76e2bc4ddc07e88e2cb1bc8959a6d7e;p=linux-2.6 dccp: Fix sequence number check for ICMPv4 packets The payload of ICMP message is a part of the packet sent by ourself, so the sequence number check must use AWL and AWH, not SWL and SWH. For example: Endpoint A Endpoint B DATA-ACK --------> (SEQ=X) <-------- ICMP (Fragmentation Needed) (SEQ=X) Signed-off-by: Wei Yongjun Acked-by: Gerrit Renker --- diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index a835b88237..6a2f1879e1 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -238,7 +238,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) dp = dccp_sk(sk); seq = dccp_hdr_seq(dh); if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) && - !between48(seq, dp->dccps_swl, dp->dccps_swh)) { + !between48(seq, dp->dccps_awl, dp->dccps_awh)) { NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); goto out; }