mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
network: make config_parse_radv_search_domains() log error in dns_name_apply_idna()
This commit is contained in:
parent
9f7d3db3ed
commit
7a99f98b50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user