From: Yu Watanabe Date: Tue, 13 Apr 2021 07:24:52 +0000 (+0900) Subject: network: dhcp4: ignore null dns address X-Git-Tag: v249-rc1~343^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e429683428182e7f9038179bd1c86edca8e0a4d;p=thirdparty%2Fsystemd.git network: dhcp4: ignore null dns address --- diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 4488f27b6c2..75ee2ea8ad3 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -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);