[or-cvs] fix a byte order bug

Ben Laurie ben at algroup.co.uk
Mon Mar 15 16:28:44 UTC 2004


Roger Dingledine wrote:

> Update of /home/or/cvsroot/src/common
> In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
> 
> Modified Files:
> 	util.c 
> Log Message:
> fix a byte order bug

nybble order, actually ;-)

> 
> 
> Index: util.c
> ===================================================================
> RCS file: /home/or/cvsroot/src/common/util.c,v
> retrieving revision 1.60
> retrieving revision 1.61
> diff -u -d -r1.60 -r1.61
> --- util.c	14 Mar 2004 18:07:46 -0000	1.60
> +++ util.c	15 Mar 2004 04:00:11 -0000	1.61
> @@ -688,7 +688,7 @@
>  
>  int is_internal_IP(uint32_t ip) {
>  
> -  if (((ip & 0xff000000) == 0xa0000000) || /*       10/8 */
> +  if (((ip & 0xff000000) == 0x0a000000) || /*       10/8 */
>        ((ip & 0xff000000) == 0x00000000) || /*        0/8 */
>        ((ip & 0xff000000) == 0x7f000000) || /*      127/8 */
>        ((ip & 0xffff0000) == 0xa9fe0000) || /* 169.254/16 */
> 
> 


-- 
http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff



More information about the tor-dev mailing list