mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
network: dhcp4: ignore null dns address
This commit is contained in:
parent
afe23f876e
commit
3e42968342
@ -519,6 +519,9 @@ static int link_set_dns_routes(Link *link, const struct in_addr *gw) {
|
||||
route->mtu = link->network->dhcp_route_mtu;
|
||||
|
||||
for (int i = 0; i < n; i ++) {
|
||||
if (in4_addr_is_null(&dns[i]))
|
||||
continue;
|
||||
|
||||
route->dst.in = dns[i];
|
||||
|
||||
r = dhcp_route_configure_auto(route, link, gw);
|
||||
|
Loading…
Reference in New Issue
Block a user