summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStéphane Graber <stgraber@ubuntu.com>2014-12-27 19:17:39 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2014-12-27 19:17:39 +0100
commit58a489c2b3628f3003d3901537bec8b5e6c1b7bd (patch)
tree3297eff5ec0d6c17a176f83522a9484f82db7d68 /src/core
parent01c51934cbca705d854c3986870ca424df0cae46 (diff)
Fix check_loopback()
Add missing htonl() so that check_loopback() actually tests for 127.0.0.1 instead of 1.0.0.127 on little-endian machines.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/loopback-setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c
index 98fc04dd2e..ab6335c0ce 100644
--- a/src/core/loopback-setup.c
+++ b/src/core/loopback-setup.c
@@ -64,7 +64,7 @@ static int check_loopback(void) {
struct sockaddr_in in;
} sa = {
.in.sin_family = AF_INET,
- .in.sin_addr.s_addr = INADDR_LOOPBACK,
+ .in.sin_addr.s_addr = htonl(INADDR_LOOPBACK),
};
/* If we failed to set up the loop back device, check whether