svn commit: r221346 - head/sys/netinet

Mikolaj Golub trociny at freebsd.org
Sat May 14 11:24:29 UTC 2011


On Sat, 14 May 2011 13:37:19 +0300 Mikolaj Golub wrote to John Baldwin:

 JB>> +        KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
 JB>> +            ("tcp_input negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
 JB>> +            tp->rcv_adv, tp->rcv_nxt));

BTW, the message is printed wrongly because of the wrong order of arguments. It
was a bit confusing :)

 JB>> Modified: head/sys/netinet/tcp_timewait.c
 JB>> ==============================================================================
 JB>> --- head/sys/netinet/tcp_timewait.c        Mon May  2 21:04:37 2011        (r221345)
 JB>> +++ head/sys/netinet/tcp_timewait.c        Mon May  2 21:05:52 2011        (r221346)
 JB>> @@ -242,6 +242,9 @@ tcp_twstart(struct tcpcb *tp)
 JB>>          /*
 JB>>           * Recover last window size sent.
 JB>>           */
 JB>> +        KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
 JB>> +            ("tcp_twstart negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
 JB>> +            tp->rcv_adv, tp->rcv_nxt));

The same here.

 JB>>          tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale;
 JB>>  
 JB>>          /*

 MG> -- 
 MG> Mikolaj Golub

-- 
Mikolaj Golub


More information about the svn-src-head mailing list