1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-13 17:18:18 +03:00

networkd: fix commit 5f04a209eae0a2a04eb60fd7235b3fcdf3cc81ba (#7432)

If classless route not provided configure default routes.
Something went wrong in the rebase.
This commit is contained in:
Susant Sahani 2017-11-23 22:08:08 +05:30 committed by Yu Watanabe
parent 459aafc6d8
commit 8dc787d185

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;