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/basic/hostname-util.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/basic/hostname-util.c')
-rw-r--r-- | src/basic/hostname-util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c index d901a5e82b..dc5434fcd1 100644 --- a/src/basic/hostname-util.c +++ b/src/basic/hostname-util.c @@ -151,6 +151,17 @@ bool is_localhost(const char *hostname) { endswith_no_case(hostname, ".localdomain."); } +bool is_gateway_hostname(const char *hostname) { + assert(hostname); + + /* This tries to identify the valid syntaxes for the our + * synthetic "gateway" host. */ + + return + strcaseeq(hostname, "gateway") || + strcaseeq(hostname, "gateway."); +} + int sethostname_idempotent(const char *s) { char buf[HOST_NAME_MAX + 1] = {}; |