svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Sun Sep 28 23:39:18 UTC 2008


Author: vda
Date: 2008-09-28 16:39:18 -0700 (Sun, 28 Sep 2008)
New Revision: 23547

Log:
route: fix for 64-bit BE machines by Seonghun Lim (wariua AT gmail.com)



Modified:
   trunk/busybox/networking/route.c


Changeset:
Modified: trunk/busybox/networking/route.c
===================================================================
--- trunk/busybox/networking/route.c	2008-09-28 19:28:51 UTC (rev 23546)
+++ trunk/busybox/networking/route.c	2008-09-28 23:39:18 UTC (rev 23547)
@@ -302,7 +302,7 @@
 
 	/* sanity checks.. */
 	if (mask_in_addr(rt)) {
-		unsigned long mask = mask_in_addr(rt);
+		uint32_t mask = mask_in_addr(rt);
 
 		mask = ~ntohl(mask);
 		if ((rt.rt_flags & RTF_HOST) && mask != 0xffffffff) {
@@ -313,7 +313,7 @@
 			bb_error_msg_and_die("bogus netmask %s", netmask);
 		}
 		mask = ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr;
-		if (mask & ~mask_in_addr(rt)) {
+		if (mask & ~(uint32_t)mask_in_addr(rt)) {
 			bb_error_msg_and_die("netmask and route address conflict");
 		}
 	}




More information about the busybox-cvs mailing list