* [PATCH 2/3]: One more exemption from full sequence number checks
@ 2007-09-29 16:42 Gerrit Renker
2007-10-01 19:34 ` Ian McDonald
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gerrit Renker @ 2007-09-29 16:42 UTC (permalink / raw)
To: dccp
[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>
---
net/dccp/ipv4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -242,7 +242,7 @@ static void dccp_v4_err(struct sk_buff *
dp = dccp_sk(sk);
seq = dccp_hdr_seq(dh);
- if (sk->sk_state != DCCP_LISTEN &&
+ if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) &&
!between48(seq, dp->dccps_swl, dp->dccps_swh)) {
NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS);
goto out;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3]: One more exemption from full sequence number checks
2007-09-29 16:42 [PATCH 2/3]: One more exemption from full sequence number checks Gerrit Renker
@ 2007-10-01 19:34 ` Ian McDonald
2007-10-02 10:15 ` Gerrit Renker
2007-10-21 1:26 ` Ian McDonald
2 siblings, 0 replies; 4+ messages in thread
From: Ian McDonald @ 2007-10-01 19:34 UTC (permalink / raw)
To: dccp
On 9/30/07, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [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>
Does this affect DCCP on IP v6? If it does, it should be fixed also.
If it doesn't then can you add that to the changelog to stop others
asking also.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3]: One more exemption from full sequence number checks
2007-09-29 16:42 [PATCH 2/3]: One more exemption from full sequence number checks Gerrit Renker
2007-10-01 19:34 ` Ian McDonald
@ 2007-10-02 10:15 ` Gerrit Renker
2007-10-21 1:26 ` Ian McDonald
2 siblings, 0 replies; 4+ messages in thread
From: Gerrit Renker @ 2007-10-02 10:15 UTC (permalink / raw)
To: dccp
| Does this affect DCCP on IP v6? If it does, it should be fixed also.
| If it doesn't then can you add that to the changelog to stop others
| asking also.
This patch is for IPv4 only - I have checked, dccp_v6_err uses a different
mechanism, so the problem fixed by this patch does not seem to appear in IPv6
as well.
Must however admit that I haven't tested the IPv6 error reporting exhaustively
(but will soon be doing more IPv6 apps), it would be good if others could test as well.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3]: One more exemption from full sequence number checks
2007-09-29 16:42 [PATCH 2/3]: One more exemption from full sequence number checks Gerrit Renker
2007-10-01 19:34 ` Ian McDonald
2007-10-02 10:15 ` Gerrit Renker
@ 2007-10-21 1:26 ` Ian McDonald
2 siblings, 0 replies; 4+ messages in thread
From: Ian McDonald @ 2007-10-21 1:26 UTC (permalink / raw)
To: dccp
On 9/30/07, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-21 1:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-29 16:42 [PATCH 2/3]: One more exemption from full sequence number checks Gerrit Renker
2007-10-01 19:34 ` Ian McDonald
2007-10-02 10:15 ` Gerrit Renker
2007-10-21 1:26 ` Ian McDonald
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.