[systemd-devel] [PATCH resend] Add support for DHCP static route options in networkd

Eugene Yakubovich eyakubovich at gmail.com
Fri Jun 27 14:33:02 PDT 2014


On Thu, Jun 26, 2014 at 1:45 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
>> +                r = sd_dhcp_lease_get_routes(link->dhcp_lease, &static_routes, &static_routes_size);
>> +                if (r >= 0) {
>> +                        for (i = 0; i < static_routes_size; i++) {
>> +                                _cleanup_route_free_ Route *route = NULL;
>> +
>> +                                r = route_new_dynamic(&route);
> This can only fail on malloc? I think it should result in futher failure,
> the error should not be swallowed.

This happens when the DHCP lease is lost and we're cleaning up the
routes. It's best to continue cleaning up rather than bail on error.
It is also consistent with other code in the same function.

I've taken care of all other feedback. Will send a new version of the
patch shortly.


More information about the systemd-devel mailing list