diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-21 15:26:45 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-21 15:26:45 +0200 |
commit | ef7051360aefca01d20f700ee74ac1baced59879 (patch) | |
tree | 7e74c19fc5928d35012d1ff99ddce20406cf92a6 /src/nss-myhostname/nss-myhostname.c | |
parent | 6b8b67e7aed7d4f98881f823b89f5f4079e52066 (diff) | |
parent | 78c6a153c47f8d597c827bdcaf8c4e42ac87f738 (diff) |
Merge pull request #1002 from poettering/resolved-various
resolved: synthesize more RRs locally and other fixes
Diffstat (limited to 'src/nss-myhostname/nss-myhostname.c')
-rw-r--r-- | src/nss-myhostname/nss-myhostname.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c index 69069cc75d..0dca891447 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -43,13 +43,6 @@ NSS_GETHOSTBYNAME_PROTOTYPES(myhostname); NSS_GETHOSTBYADDR_PROTOTYPES(myhostname); -static bool is_gateway(const char *hostname) { - assert(hostname); - - return streq(hostname, "gateway") || - streq(hostname, "gateway."); -} - enum nss_status _nss_myhostname_gethostbyname4_r( const char *name, struct gaih_addrtuple **pat, @@ -81,7 +74,7 @@ enum nss_status _nss_myhostname_gethostbyname4_r( canonical = "localhost"; local_address_ipv4 = htonl(INADDR_LOOPBACK); - } else if (is_gateway(name)) { + } else if (is_gateway_hostname(name)) { n_addresses = local_gateways(NULL, 0, AF_UNSPEC, &addresses); if (n_addresses <= 0) { @@ -351,7 +344,7 @@ enum nss_status _nss_myhostname_gethostbyname3_r( canonical = "localhost"; local_address_ipv4 = htonl(INADDR_LOOPBACK); - } else if (is_gateway(name)) { + } else if (is_gateway_hostname(name)) { n_addresses = local_gateways(NULL, 0, af, &addresses); if (n_addresses <= 0) { |