summaryrefslogtreecommitdiffstats
path: root/tcpip/rip98r.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcpip/rip98r.c')
-rw-r--r--tcpip/rip98r.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c
index 57afe4e..8332944 100644
--- a/tcpip/rip98r.c
+++ b/tcpip/rip98r.c
@@ -26,8 +26,8 @@ static int cmp_route(struct route_struct *route, struct in_addr addr, int bits,
unsigned long int old_mask, new_mask;
unsigned long int old_addr, new_addr;
- old_mask = ntohl(bits2mask(route->bits));
- new_mask = ntohl(bits2mask(bits));
+ old_mask = bits2mask(route->bits);
+ new_mask = bits2mask(bits);
old_addr = route->addr.s_addr;
new_addr = addr.s_addr;
@@ -234,7 +234,7 @@ void receive_routes(int s)
if (route->bits == 32) {
rt.rt_flags |= RTF_HOST;
} else {
- netmask = bits2mask(route->bits);
+ netmask = htonl(bits2mask(route->bits));
trg.sin_family = AF_INET;
memcpy((char *)&trg.sin_addr, (char *)&netmask, sizeof(struct in_addr));