summaryrefslogtreecommitdiff
path: root/accel-pppd/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/utils.c')
-rw-r--r--accel-pppd/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/accel-pppd/utils.c b/accel-pppd/utils.c
index 45e8709..81b4c99 100644
--- a/accel-pppd/utils.c
+++ b/accel-pppd/utils.c
@@ -12,7 +12,8 @@ extern int urandom_fd;
void __export u_inet_ntoa(in_addr_t addr, char *str)
{
- sprintf(str, "%i.%i.%i.%i", addr & 0xff, (addr >> 8) & 0xff, (addr >> 16) & 0xff, (addr >> 24) & 0xff);
+ addr = ntohl(addr);
+ sprintf(str, "%i.%i.%i.%i", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
}
int __export u_readlong(long int *dst, const char *src,