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>
This commit is contained in:
parent
2cf5be93d1
commit
763dadd47c
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue