summaryrefslogtreecommitdiff
path: root/gdhcp/ipv4ll.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdhcp/ipv4ll.c')
-rw-r--r--gdhcp/ipv4ll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdhcp/ipv4ll.c b/gdhcp/ipv4ll.c
index 4c095722..007ffe6b 100644
--- a/gdhcp/ipv4ll.c
+++ b/gdhcp/ipv4ll.c
@@ -36,7 +36,7 @@
#include "ipv4ll.h"
/**
- * Return a random link local IP
+ * Return a random link local IP (in host byte order)
*/
uint32_t ipv4ll_random_ip(int seed)
{
@@ -53,7 +53,7 @@ uint32_t ipv4ll_random_ip(int seed)
tmp = rand();
tmp = tmp & IN_CLASSB_HOST;
} while (tmp > (IN_CLASSB_HOST - 0x0200));
- return ((LINKLOCAL_ADDR + 0x0100) + tmp);
+ return ntohl(((LINKLOCAL_ADDR + 0x0100) + tmp));
}
/**