mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 22:21:45 +00:00
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.
(cherry picked from commit 58a489c2b3)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
d19bec3b2a
commit
da976dd009
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user