rtnl_link_delete returns 0 instead of -NLE_NODEV when a link cache is created
Thomas Graf
tgraf at suug.ch
Tue May 6 03:41:32 PDT 2014
On 04/30/14 at 04:53pm, Thomas Haller wrote:
> If you change:
>
> atexit(cleanup);
>
> + while (nl_cache_mngr_poll (mngr, 1000) > 0);
>
> /* delete another link which doesn't exist */
> link_2 = rtnl_link_alloc();
>
> then you get the NLE_NODEV.
>
> But this is not the real fix. The solution is to leave the socket to the
> cache manager and create your own socket.
We should probably make this more obvious in the documentation
and maybe find a way to better abstract this in the code.
More information about the libnl
mailing list