Fix a timer ticks wrap around bug for minmssoverload processing.

Approved by:	re (scottl,dwhite)
MFC after:	4 weeks
This commit is contained in:
Stephan Uphoff 2005-06-25 22:24:45 +00:00
parent 769c6708cb
commit 68d376254c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147605
2 changed files with 2 additions and 2 deletions

View file

@ -1039,7 +1039,7 @@ tcp_input(m, off0)
*/
if (tcp_minmss && tcp_minmssoverload &&
tp->t_state == TCPS_ESTABLISHED && tlen > 0) {
if (tp->rcv_second > ticks) {
if ((unsigned int)(tp->rcv_second - ticks) < hz) {
tp->rcv_pps++;
tp->rcv_byps += tlen + off;
if (tp->rcv_pps > tcp_minmssoverload) {

View file

@ -1039,7 +1039,7 @@ tcp_input(m, off0)
*/
if (tcp_minmss && tcp_minmssoverload &&
tp->t_state == TCPS_ESTABLISHED && tlen > 0) {
if (tp->rcv_second > ticks) {
if ((unsigned int)(tp->rcv_second - ticks) < hz) {
tp->rcv_pps++;
tp->rcv_byps += tlen + off;
if (tp->rcv_pps > tcp_minmssoverload) {