networkd: fix commit 5f04a209ea (#7432)

If classless route not provided configure default routes.
Something went wrong in the rebase.
This commit is contained in:
Susant Sahani
2017-11-24 01:38:08 +09:00
committed by Yu Watanabe
parent 459aafc6d8
commit 8dc787d185
+1 -3
View File
@@ -95,10 +95,8 @@ static int link_set_dhcp_routes(Link *link) {
return log_link_warning_errno(link, r, "DHCP error: could not get address: %m");
n = sd_dhcp_lease_get_routes(link->dhcp_lease, &static_routes);
if (n == -ENODATA)
return 0;
if (n < 0)
return log_link_warning_errno(link, n, "DHCP error: could not get routes: %m");
log_link_debug_errno(link, n, "DHCP error: could not get routes: %m");
for (i = 0; i < n; i++) {
_cleanup_route_free_ Route *route = NULL;