Subject: Re: bin/34578 (iscsi_target rejects Windows iscsi initiator.)
To: None <gnats-bugs@netbsd.org>
From: nakamoto <hiroshi-n@iname.com>
List: netbsd-bugs
Date: 11/27/2006 17:34:43
The original code did not work with "192.168.x.x" in my case ( I just
copied the code fragment into my local test program ).. If >> 32 is not
guaranteed, /0 (and /32 ?) should be handled in other branches ( it may
be faster ).

Hiroshi Nakamoto
> 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)
>  
>
>