Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh
From: David Ahern <hidden>
Date: 2019-03-28 02:05:09
On 3/27/19 7:30 PM, Alexei Starovoitov wrote:
quoted
quoted
imo it would be cleaner not to mess with cfg. Ideally it should be marked 'const'.Existing code sets those flags but on a fib6_info. This is not used for nexthop objects and is kept here to not duplicate this if branch in the create_info that uses it. This check affects both which device is used as well as the flags.What stopping you from doing fib6_nh->nh_flags |= RTF_REJECT | RTF_NONEXTHOP ? cfg should really be const.
Because it is not a nexthop flag, it is a prefix flag.
quoted
quoted
lwtstate_put() is missing in the error path of existing code. Is this a bug fix? Why there is nothing about this in commit log?Existing code has a different cleanup path. This is done explicitly here per a request from Ido in v1 that the new function be symmetric in its cleanup on an error.I saw that comment. What I don't see is where existing code doing that cleanup. Could you please point it out?
fib6_info_release -> fib6_info_destroy_rcu