diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-15 09:16:13 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-19 03:23:00 +0200 |
commit | 9646ffe2cacb5dccf1fcb8bcc54bf0d315bd0000 (patch) | |
tree | 8cb84a36d2c02e1067f7adf45d7e2bd1a9bc2739 /src/network/networkd-json.c | |
parent | network: introduce link_get_use_domains() (diff) | |
download | systemd-9646ffe2cacb5dccf1fcb8bcc54bf0d315bd0000.tar.xz systemd-9646ffe2cacb5dccf1fcb8bcc54bf0d315bd0000.zip |
network: introduce link_get_use_dns()
No functional change, just refactoring.
Diffstat (limited to 'src/network/networkd-json.c')
-rw-r--r-- | src/network/networkd-json.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-json.c b/src/network/networkd-json.c index 4fd75f4bfe..d9eeaff122 100644 --- a/src/network/networkd-json.c +++ b/src/network/networkd-json.c @@ -448,7 +448,7 @@ static int dns_append_json(Link *link, JsonVariant **v) { return r; } - if (link->dhcp_lease && link->network->dhcp_use_dns) { + if (link->dhcp_lease && link_get_use_dns(link, NETWORK_CONFIG_SOURCE_DHCP4)) { const struct in_addr *dns; union in_addr_union s; int n_dns; @@ -469,7 +469,7 @@ static int dns_append_json(Link *link, JsonVariant **v) { } } - if (link->dhcp6_lease && link->network->dhcp6_use_dns) { + if (link->dhcp6_lease && link_get_use_dns(link, NETWORK_CONFIG_SOURCE_DHCP6)) { const struct in6_addr *dns; union in_addr_union s; int n_dns; @@ -490,7 +490,7 @@ static int dns_append_json(Link *link, JsonVariant **v) { } } - if (link->network->ndisc_use_dns) { + if (link_get_use_dns(link, NETWORK_CONFIG_SOURCE_NDISC)) { NDiscRDNSS *a; SET_FOREACH(a, link->ndisc_rdnss) { |