Skip to content

Commit 1238d08

Browse files
Gerrit RenkerArnaldo Carvalho de Melo
authored andcommitted
[DCCP]: One more exemption from full sequence number checks
This fixes the following problem: client connects to peer which has no DCCP enabled or loaded; ICMP error messages ("Protocol Unavailable") can be seen on the wire, but the application hangs. Reason: ICMP packets don't get through to dccp_v4_err. When reporting errors, a sequence number check is made for the DCCP packet that had caused an ICMP error to arrive. Such checks can not be made if the socket is in state LISTEN, RESPOND (which in the implementation is the same as LISTEN), or REQUEST, since update_gsr() has not been called in these states, hence the sequence window is 0..0. This patch fixes the problem by adding the REQUEST state as another exemption to the window check. The error reporting now works as expected on connecting. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
1 parent fde2010 commit 1238d08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/dccp/ipv4.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
242242

243243
dp = dccp_sk(sk);
244244
seq = dccp_hdr_seq(dh);
245-
if (sk->sk_state != DCCP_LISTEN &&
245+
if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) &&
246246
!between48(seq, dp->dccps_swl, dp->dccps_swh)) {
247247
NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS);
248248
goto out;

0 commit comments

Comments
 (0)