diff options
Diffstat (limited to 'src/core/devices/wifi/nm-wifi-utils.c')
| -rw-r--r-- | src/core/devices/wifi/nm-wifi-utils.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/devices/wifi/nm-wifi-utils.c b/src/core/devices/wifi/nm-wifi-utils.c index 8a8d062f..332352ab 100644 --- a/src/core/devices/wifi/nm-wifi-utils.c +++ b/src/core/devices/wifi/nm-wifi-utils.c @@ -1577,19 +1577,17 @@ ip_config_to_iwd_config(int addr_family, GKeyFile *file, NMSettingIPConfig *s_ip if (num) { nm_str_buf_reset(&strbuf); for (i = 0; i < num; i++) { - char sbuf[NM_INET_ADDRSTRLEN]; - NMIPAddr a; - - if (!nm_utils_dnsname_parse_assert(addr_family, - nm_setting_ip_config_get_dns(s_ip, i), - NULL, - &a, - NULL)) + char addrstr[NM_INET_ADDRSTRLEN]; + + if (!nm_dns_uri_parse_plain(addr_family, + nm_setting_ip_config_get_dns(s_ip, i), + addrstr, + NULL)) continue; if (strbuf.len > 0) nm_str_buf_append_c(&strbuf, ' '); - nm_str_buf_append(&strbuf, nm_inet_ntop(addr_family, &a, sbuf)); + nm_str_buf_append(&strbuf, addrstr); } /* It doesn't matter whether we add the DNS under [IPv4] or [IPv6] * except that with method=auto the list will override the |