Use the sequence number comparison macro to compare
projected_offset against isn_offset to account for wrap around. Reviewed by: gnn, kmacy, silby Submitted by: yusheng.huang@bluecoat.com Approved by: re MFC: 3 days
This commit is contained in:
parent
83d18f2283
commit
8cb5ba02d8
@ -1412,7 +1412,7 @@ tcp_new_isn(struct tcpcb *tp)
|
||||
}
|
||||
|
||||
/*
|
||||
* Increment the offset to the next ISN_BYTES_PER_SECOND / hz boundary
|
||||
* Increment the offset to the next ISN_BYTES_PER_SECOND / 100 boundary
|
||||
* to keep time flowing at a relatively constant rate. If the random
|
||||
* increments have already pushed us past the projected offset, do nothing.
|
||||
*/
|
||||
@ -1424,7 +1424,7 @@ tcp_isn_tick(void *xtp)
|
||||
ISN_LOCK();
|
||||
projected_offset = isn_offset_old + ISN_BYTES_PER_SECOND / 100;
|
||||
|
||||
if (projected_offset > isn_offset)
|
||||
if (SEQ_GT(projected_offset, isn_offset))
|
||||
isn_offset = projected_offset;
|
||||
|
||||
isn_offset_old = isn_offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user