From d50cf59b94e44d359c3f947a990b730a1f1a242c Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 10 Feb 2014 11:53:16 +0100 Subject: [PATCH] networkd: fix setting dns from dhcp --- src/network/networkd-link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 867baa6..6468f9c 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -562,6 +562,8 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { ADDRESS_FMT_VAL(gateway), NULL); + link->dhcp_lease = lease; + if (link->network->dhcp_dns) { r = sd_dhcp_lease_get_dns(lease, &nameservers, &nameservers_size); if (r >= 0) { @@ -595,8 +597,6 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { } } - link->dhcp_lease = lease; - link_enter_set_addresses(link); return 0; -- 2.7.4