diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-11-25 14:50:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-11-25 17:41:55 +0100 |
commit | 056c398bdacb11775f163cbf51268bc79b6b612b (patch) | |
tree | ea3d217ada6887ceefaeacd6d8d3e81fadf6b047 /src/nss-myhostname | |
parent | 17f244e8f9de008ea1c6e0880bdc924b95a66e2b (diff) | |
download | systemd-056c398bdacb11775f163cbf51268bc79b6b612b.tar.gz |
resolved: introduce common macro for 127.0.0.2 IP address
Diffstat (limited to 'src/nss-myhostname')
-rw-r--r-- | src/nss-myhostname/nss-myhostname.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c index 120e76be45..3af1d2f0c1 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -12,6 +12,7 @@ #include "local-addresses.h" #include "macro.h" #include "nss-util.h" +#include "resolve-util.h" #include "signal-util.h" #include "socket-util.h" #include "string-util.h" @@ -21,7 +22,7 @@ * IPv6 we use ::1 which unfortunately will not translate back to the * hostname but instead something like "localhost" or so. */ -#define LOCALADDRESS_IPV4 (htobe32(0x7F000002)) +#define LOCALADDRESS_IPV4 (htobe32(INADDR_LOCALADDRESS)) #define LOCALADDRESS_IPV6 &in6addr_loopback NSS_GETHOSTBYNAME_PROTOTYPES(myhostname); |