genl_ctrl_resolve with "nlctrl" is it needed ?

Thomas Graf tgraf at suug.ch
Sun Sep 14 01:03:48 PDT 2014


On 09/13/14 at 05:48pm, David Shwatrz wrote:
> Helllo,
> I had commented the following lines in tests/test-genl.c of the most
> recent git repo:
> 
> +       //if (genl_ctrl_resolve(sock, "nlctrl") != GENL_ID_CTRL)
> +       //      nl_cli_fatal(NLE_INVAL, "Resolving of \"nlctrl\" failed");
> 
> 
> And building and running it gives the same result as before.
> 
> Why is genl_ctrl_resolve(sock, "nlctrl") != GENL_ID_CTRL) needed ?
> can it be removed ?

It's a test, hence it's existence in the tests directory. The nlctrl
family is the only family guaranteed to exist on any kernel with genl
support.



More information about the libnl mailing list