[systemd-commits] src/core
Martin Pitt
martin at kemper.freedesktop.org
Sat Dec 27 10:19:36 PST 2014
src/core/loopback-setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 58a489c2b3628f3003d3901537bec8b5e6c1b7bd
Author: Stéphane Graber <stgraber at ubuntu.com>
Date: Sat Dec 27 19:17:39 2014 +0100
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.
diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c
index 98fc04d..ab6335c 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
More information about the systemd-commits
mailing list