mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
networkd: fix setting dns from dhcp
This commit is contained in:
parent
bbf261b75f
commit
d50cf59b94
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user