Subject: Re: bin/34578 (iscsi_target rejects Windows iscsi initiator.)
To: None <agc@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Alan Barrett <apb@cequrux.com>
List: netbsd-bugs
Date: 11/27/2006 06:30:02
The following reply was made to PR bin/34578; it has been noted by GNATS.

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@NetBSD.org
Subject: Re: bin/34578 (iscsi_target rejects Windows iscsi initiator.)
Date: Mon, 27 Nov 2006 09:38:58 +0400

 On Mon, 27 Nov 2006, nakamoto wrote:
 >  As the original problem was shifting only 31 bits when the mask is
 >  "0.0.0.0/0", the reproduction of the bug depends on MSB ( or LSB ) of
 >  the initiator's address.
 >  I tested the initiator with "192.168.x..x" ( MSB is set) and your IP
 >  address is "10.x.x.x" ( MSB is not set ).
 
 I don't know exactly where this code is, but the symptoms suggest that
 it's using the << operator with a signed 32-bit value on the left
 hand side, and 32 on the right hand side.  The C standard does not
 guarantee the results of such an operation.  See revision 1.105 of
 sbin/route/route.c for a fix to a similar issue.
 
 --apb (Alan Barrett)