diff options
author | Denis Vlasenko | 2008-09-28 23:39:18 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-09-28 23:39:18 +0000 |
commit | 58680706d7f281f9c91afa3917d5b705e61a39ca (patch) | |
tree | f430abf3f2a051720b9acdaa488e8ca9eb5dc057 | |
parent | 22eb410d66e9f19191d8d27852754914fabeedb7 (diff) | |
download | busybox-58680706d7f281f9c91afa3917d5b705e61a39ca.zip busybox-58680706d7f281f9c91afa3917d5b705e61a39ca.tar.gz |
route: fix for 64-bit BE machines by Seonghun Lim (wariua AT gmail.com)
-rw-r--r-- | networking/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/route.c b/networking/route.c index 2bc2f92..8778ecd 100644 --- a/networking/route.c +++ b/networking/route.c @@ -302,7 +302,7 @@ static void INET_setroute(int action, char **args) /* 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 @@ static void INET_setroute(int action, char **args) 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"); } } |