libnl incorrectly handles the object not found case
Sitbon Nicolas
nsitbon at denyall.com
Fri Mar 25 10:25:09 EDT 2011
Hi,
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.
Regards.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-correctly-handle-the-object-not-found-case.patch
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110325/3b0eef98/attachment.ksh>
More information about the libnl
mailing list