diff options
author | Tom Gundersen <teg@jklm.no> | 2014-08-15 14:49:31 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-08-15 15:15:24 +0200 |
commit | 67272d157a35e5cda4e5c904eafdcc23d20541d1 (patch) | |
tree | 99befd9c7b29c91d355ed02b4236e58aefab7e5a /src/network/networkd-network.c | |
parent | 6192b846ca0d15602e94ddb5da4420b7c60d64a5 (diff) |
sd-network: add support for wildcard domains
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r-- | src/network/networkd-network.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index bbc5d279e9..f3b2c68430 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -351,6 +351,7 @@ int config_parse_domains(const char *unit, const char *rvalue, void *data, void *userdata) { + Network *network = userdata; char ***domains = data; char **domain; int r; @@ -362,6 +363,11 @@ int config_parse_domains(const char *unit, strv_uniq(*domains); + if (strv_isempty(*domains)) + network->wildcard_domain = false; + else if (strv_find(*domains, "*")) + network->wildcard_domain = true; + STRV_FOREACH(domain, *domains) if (is_localhost(*domain) || !hostname_is_valid(*domain)) strv_remove(*domains, *domain); |