diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-25 21:47:02 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-26 14:42:04 +0100 |
commit | 27cb34f57458758ee8615d72c6a60a39d4b92226 (patch) | |
tree | ed9c33c7375c3a8404b7acc82f69e9bd4af00bfd /src/network/networkd-link.c | |
parent | 3a519900e18c6a36af084cdbcc468f670f4ffdb1 (diff) |
networkd: rename a few Network object properties to be more like the configuration settings
All booleans called dhcp_xyz are now called ".dhcp_use_xyz", to match their respective configuration file settings. This
should clarify things a bit, in particular as there is a DHCP hostname that was previously called just ".hostname"
because ".dhcp_hostname" was already existing as a bool. Since this confusion is removed now because the bool is called
".dhcp_use_hostname", the string field is now renamed to ".dhcp_hostname".
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index c152ec3cf6..b0e0c4f9e7 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -767,7 +767,7 @@ static int link_push_dns_to_dhcp_server(Link *link, sd_dhcp_server *s) { addresses[n_addresses++] = ia; } - if (link->network->dhcp_dns && + if (link->network->dhcp_use_dns && link->dhcp_lease) { const struct in_addr *da = NULL; int n; @@ -812,7 +812,7 @@ static int link_push_ntp_to_dhcp_server(Link *link, sd_dhcp_server *s) { addresses[n_addresses++] = ia; } - if (link->network->dhcp_ntp && + if (link->network->dhcp_use_ntp && link->dhcp_lease) { const struct in_addr *da = NULL; int n; @@ -2744,7 +2744,7 @@ int link_save(Link *link) { space = false; fputstrv(f, link->network->dns, NULL, &space); - if (link->network->dhcp_dns && + if (link->network->dhcp_use_dns && link->dhcp_lease) { const struct in_addr *addresses; @@ -2757,7 +2757,7 @@ int link_save(Link *link) { } } - if (link->network->dhcp_dns && dhcp6_lease) { + if (link->network->dhcp_use_dns && dhcp6_lease) { struct in6_addr *in6_addrs; r = sd_dhcp6_lease_get_dns(dhcp6_lease, &in6_addrs); @@ -2774,7 +2774,7 @@ int link_save(Link *link) { space = false; fputstrv(f, link->network->ntp, NULL, &space); - if (link->network->dhcp_ntp && + if (link->network->dhcp_use_ntp && link->dhcp_lease) { const struct in_addr *addresses; @@ -2787,7 +2787,7 @@ int link_save(Link *link) { } } - if (link->network->dhcp_ntp && dhcp6_lease) { + if (link->network->dhcp_use_ntp && dhcp6_lease) { struct in6_addr *in6_addrs; char **hosts; @@ -2810,7 +2810,7 @@ int link_save(Link *link) { fputs("DOMAINS=", f); fputstrv(f, link->network->search_domains, NULL, &space); - if (link->network->dhcp_domains && + if (link->network->dhcp_use_domains && link->dhcp_lease) { const char *domainname; @@ -2823,7 +2823,7 @@ int link_save(Link *link) { } } - if (link->network->dhcp_domains && dhcp6_lease) { + if (link->network->dhcp_use_domains && dhcp6_lease) { char **domains; r = sd_dhcp6_lease_get_domains(dhcp6_lease, &domains); |