summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 867baa6dee..6468f9cd31 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;