mirror of
https://github.com/systemd/systemd.git
synced 2025-01-13 17:18:18 +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;
|
route->mtu = link->network->dhcp_route_mtu;
|
||||||
|
|
||||||
for (int i = 0; i < n; i ++) {
|
for (int i = 0; i < n; i ++) {
|
||||||
|
if (in4_addr_is_null(&dns[i]))
|
||||||
|
continue;
|
||||||
|
|
||||||
route->dst.in = dns[i];
|
route->dst.in = dns[i];
|
||||||
|
|
||||||
r = dhcp_route_configure_auto(route, link, gw);
|
r = dhcp_route_configure_auto(route, link, gw);
|
||||||
|
Loading…
Reference in New Issue
Block a user