rtnl_route_nh_set_gateway

Thomas Graf tgraf at infradead.org
Wed May 9 02:34:57 EDT 2012


On Tue, May 08, 2012 at 04:17:58PM -0600, Justin Mayfield wrote:
> I have a question/comment about a minor API inconsistency.  I have a
> routine that takes function pointers from the following functions:
> 
>    rtnl_rule_set_src
>    rtnl_rule_set_dst
>    rtnl_route_set_src
>    rtnl_route_set_dst
>    rtnl_route_set_pref_src
>    rtnl_route_nh_set_gateway
> 
> All of these except for rtnl_route_nh_set_gateway() return an int.
> I can easily wrap this but it seemed worth mentioning that of all
> the nl_addr "setters" this was the only one to not return an int.

I agree that it would make sense to have rtnl_route_nh_set_gateway()
return an int as well. It's simply a bug. I don't want to fix it at
this point though, as it would break ABI with only little to gain.

I have put in a FIXME so we can change this when we break API/ABI for
real next time (libnl 4.x).

Good enough for you?

~Thomas



More information about the libnl mailing list