diff options
author | qingli <qingli@FreeBSD.org> | 2007-08-16 01:35:55 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2007-08-16 01:35:55 +0000 |
commit | ba0da0a95deba64ddb6dc37fb2698973ff97e1ef (patch) | |
tree | 18a844828738e0e4c5fe93c4951065ae4cc92ab7 /sys | |
parent | fcec3dfa481cd41cfe77025d8ad114e7bc6ddd87 (diff) | |
download | FreeBSD-src-ba0da0a95deba64ddb6dc37fb2698973ff97e1ef.zip FreeBSD-src-ba0da0a95deba64ddb6dc37fb2698973ff97e1ef.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index ff0466a..2dd20e5 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -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; |