diff options
author | Samuel Jero <sj323707@ohio.edu> | 2010-12-30 12:15:41 +0100 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2011-01-07 12:22:43 +0100 |
commit | 763dadd47c884853a22f2f19ea27e58431303ff3 (patch) | |
tree | 9ee3daff6fe649578d3fabdc0a1fcf8252b7b660 /net | |
parent | 2cf5be93d1b704f342ad423a49f0e78d73939e66 (diff) | |
download | linux-rpi3-763dadd47c884853a22f2f19ea27e58431303ff3.tar.gz linux-rpi3-763dadd47c884853a22f2f19ea27e58431303ff3.tar.bz2 linux-rpi3-763dadd47c884853a22f2f19ea27e58431303ff3.zip |
dccp: fix bug in updating the GSR
Currently dccp_check_seqno allows any valid packet to update the Greatest
Sequence Number Received, even if that packet's sequence number is less than
the current GSR. This patch adds a check to make sure that the new packet's
sequence number is greater than GSR.
Signed-off-by: Samuel Jero <sj323707@ohio.edu>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/dccp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 45087052d894..5fdb07229017 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -426,7 +426,8 @@ static inline void dccp_update_gsr(struct sock *sk, u64 seq) { struct dccp_sock *dp = dccp_sk(sk); - dp->dccps_gsr = seq; + if (after48(seq, dp->dccps_gsr)) + dp->dccps_gsr = seq; /* Sequence validity window depends on remote Sequence Window (7.5.1) */ dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4); /* |