summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c6
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);