* Jay A. Kreibich:

>   Yeah, I screwed that up.  I was too caught up on the other error.
>
>   In the original function (-1 << network_size) returns the wrong bit
>   mask.  For example, 10.0.0.0/8 should return a netmask of 255.0.0.0,
>   or 0xFF000000.  The original function will return 255.255.255.0,
>   which is a /24 mask.
>
>   My mind was thinking "you need to flip that", but did the wrong
>   thing.  We're looking for (ip_addr & (~0 << (32 - network_size))).

That's why it's called network_size and not prefix_length, I think.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to