summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-08 12:29:38 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-08 12:29:38 +0900
commit7a99f98b50b9788e22140c812f7be733dad0725a (patch)
tree51ba5a306a2ce423ed67038005784ab742d7b1d1 /src
parent9f7d3db3ed5073d70face123f30500fd0e82bffe (diff)
downloadsystemd-7a99f98b50b9788e22140c812f7be733dad0725a.tar.gz
systemd-7a99f98b50b9788e22140c812f7be733dad0725a.tar.bz2
systemd-7a99f98b50b9788e22140c812f7be733dad0725a.zip
network: make config_parse_radv_search_domains() log error in dns_name_apply_idna()
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-network.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index f257ac6698..fb4c519dbe 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -1154,8 +1154,7 @@ int config_parse_radv_search_domains(
assert(rvalue);
for (;;) {
- _cleanup_free_ char *w = NULL;
- _cleanup_free_ char *idna = NULL;
+ _cleanup_free_ char *w = NULL, *idna = NULL;
r = extract_first_word(&p, &w, NULL, 0);
if (r == -ENOMEM)
@@ -1168,11 +1167,15 @@ int config_parse_radv_search_domains(
break;
r = dns_name_apply_idna(w, &idna);
+ if (r < 0) {
+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to apply IDNA to domain name '%s', ignoring: %m", w);
+ continue;
+ }
if (r > 0) {
r = strv_push(&n->router_search_domains, idna);
if (r >= 0)
idna = NULL;
- } else if (r == 0) {
+ } else {
r = strv_push(&n->router_search_domains, w);
if (r >= 0)
w = NULL;