]> bbs.cooldavid.org Git - net-next-2.6.git/commit
dccp: fix the adjustments to AWL and SWL
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Mon, 11 Oct 2010 18:35:40 +0000 (20:35 +0200)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 12 Oct 2010 04:57:40 +0000 (06:57 +0200)
commit0b53d4604ac2b4f2faa9a62a04ea9b383ad2efe0
tree70ed0d136ef719f33655f78b31650d1c88cd3e00
parent0ed8ddf4045fcfcac36bad753dc4046118c603ec
dccp: fix the adjustments to AWL and SWL

This fixes a problem and a potential loophole with regard to seqno/ackno
validity: currently the initial adjustments to AWL/SWL are only performed
once at the begin of the connection, during the handshake.

Since the Sequence Window feature is always greater than Wmin=32 (7.5.2),
it is however necessary to perform these adjustments at least for the first
W/W' (variables as per 7.5.1) packets in the lifetime of a connection.

This requirement is complicated by the fact that W/W' can change at any time
during the lifetime of a connection.

Therefore it is better to perform that safety check each time SWL/AWL are
updated, as implemented by the patch.

A second problem solved by this patch is that the remote/local Sequence Window
feature values (which set the bounds for AWL/SWL/SWH) are undefined until the
feature negotiation has completed.

During the initial handshake we have more stringent sequence number protection;
the changes added by this patch effect that {A,S}W{L,H} are within the correct
bounds at the instant that feature negotiation completes (since the SeqWin
feature activation handlers call dccp_update_gsr/gss()).

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net/dccp/dccp.h
net/dccp/input.c
net/dccp/minisocks.c