libnl incorrectly handles the object not found case

Thomas Graf tgraf at infradead.org
Fri Mar 25 11:52:42 EDT 2011


On Fri, Mar 25, 2011 at 03:25:09PM +0100, Sitbon Nicolas wrote:
> Removing non existent route (both ipv4 and ipv6) using
> rtnl_route_delete return NLE_FAILURE generic error code. After
> investigation, it seems the linux kernel return -ESRCH in that case
> (see http://lxr.linux.no/linux+v2.6.38/net/ipv6/route.c#L1367). Same
> behaviour apply for removing non existent address. The function
> nl_syserr2nlerr (lib/error.c) which is responsible for translating
> from kernel error to libnl error doesn't handle ESRCH. The problem
> is present at least in version 2.0 and 3.0 of libnl. I propose a
> patch for the 3.0 in attachment.

Applied, thanks!



More information about the libnl mailing list