Subject: Re: kern/34674: Panic in tcp_input() by integer division fault
To: None <dbj@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 10/01/2006 15:40:02
The following reply was made to PR kern/34674; it has been noted by GNATS.

From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/34674: Panic in tcp_input() by integer division fault
Date: Sun, 1 Oct 2006 17:35:01 +0200

 Michael van Elst wrote:
 >                  *txsegsizep = min((so->so_snd.sb_hiwat -
 >                          so->so_snd.sb_lowat + 1) >> 1, *txsegsizep); 
 >  With 1.143 the computation of txsegsize is a bit different:
 >  
 >                 *txsegsizep = min(so->so_snd.sb_hiwat >> 1, *txsegsizep);
 
 As hiwat is guaranteed to be equal or larger than lowat, I guess changing
 the "+ 2" should fix this because ">> 1" can never gain zero then. I'll
 try this.
 
 -- 
 Christian