mirror of
https://github.com/systemd/systemd.git
synced 2025-05-29 01:05:59 +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),
|
ADDRESS_FMT_VAL(gateway),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
link->dhcp_lease = lease;
|
||||||
|
|
||||||
if (link->network->dhcp_dns) {
|
if (link->network->dhcp_dns) {
|
||||||
r = sd_dhcp_lease_get_dns(lease, &nameservers, &nameservers_size);
|
r = sd_dhcp_lease_get_dns(lease, &nameservers, &nameservers_size);
|
||||||
if (r >= 0) {
|
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);
|
link_enter_set_addresses(link);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user