diff options
-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 2bc2f9210..8778ecd38 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -302,7 +302,7 @@ static void INET_setroute(int action, char **args) | |||
302 | 302 | ||
303 | /* sanity checks.. */ | 303 | /* sanity checks.. */ |
304 | if (mask_in_addr(rt)) { | 304 | if (mask_in_addr(rt)) { |
305 | unsigned long mask = mask_in_addr(rt); | 305 | uint32_t mask = mask_in_addr(rt); |
306 | 306 | ||
307 | mask = ~ntohl(mask); | 307 | mask = ~ntohl(mask); |
308 | if ((rt.rt_flags & RTF_HOST) && mask != 0xffffffff) { | 308 | if ((rt.rt_flags & RTF_HOST) && mask != 0xffffffff) { |
@@ -313,7 +313,7 @@ static void INET_setroute(int action, char **args) | |||
313 | bb_error_msg_and_die("bogus netmask %s", netmask); | 313 | bb_error_msg_and_die("bogus netmask %s", netmask); |
314 | } | 314 | } |
315 | mask = ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr; | 315 | mask = ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr; |
316 | if (mask & ~mask_in_addr(rt)) { | 316 | if (mask & ~(uint32_t)mask_in_addr(rt)) { |
317 | bb_error_msg_and_die("netmask and route address conflict"); | 317 | bb_error_msg_and_die("netmask and route address conflict"); |
318 | } | 318 | } |
319 | } | 319 | } |