summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-02-04 23:13:52 +0100
committerTom Gundersen <teg@jklm.no>2014-02-07 15:48:35 +0100
commita6cc569e33a05b07550c6c7b4d67d83d868f8bc1 (patch)
tree5b8754fa594896f79ba4cb62772f6b1b49be4325 /src/network/networkd-manager.c
parentd72143bad46b51fc0bbedf01ff92aea8b07afac6 (diff)
sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_client
This allows us users of the library to keep copies of old leases. This is used by networkd to know what addresses to drop (if any) when the lease expires. In the future this may be used by DNAv4 and sd-dhcp-server.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index a007b0485f..1b3e71ab0e 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -364,12 +364,12 @@ int manager_update_resolv_conf(Manager *m) {
"# static file or a different symlink.\n\n", f);
HASHMAP_FOREACH(link, m->links, i) {
- if (link->dhcp) {
+ if (link->dhcp_lease) {
struct in_addr *nameservers;
size_t nameservers_size;
if (link->network->dhcp_dns) {
- r = sd_dhcp_client_get_dns(link->dhcp, &nameservers, &nameservers_size);
+ r = sd_dhcp_lease_get_dns(link->dhcp_lease, &nameservers, &nameservers_size);
if (r >= 0) {
unsigned j;
@@ -379,7 +379,7 @@ int manager_update_resolv_conf(Manager *m) {
}
if (link->network->dhcp_domainname && !domainname) {
- r = sd_dhcp_client_get_domainname(link->dhcp, &domainname);
+ r = sd_dhcp_lease_get_domainname(link->dhcp_lease, &domainname);
if (r >= 0)
fprintf(f, "domain %s\n", domainname);
}