Fix ntrack for latest libnl release#1319
Conversation
|
Doesn't a comment on ntrack bugtracker say this patch is not enough? |
|
The comment was questioning whether it was enough due to the pointer type mismatch. The correction to the posted patch is incorporated in this change, which also uses OBJ_CAST to cast from nl_object_ops to an nl_object. Supposedly this is perfectly valid. |
Such a cast looks risky… Do you know any application to test this (I added an override to use |
|
No one seems to have an idea how to test the code path. Why is this package even required for the build? It seems like a very uncommon package. |
|
Just fixed this with a proper patch. Notice that the route_obj_ops are used to create all of the rtnl_route such as the topmost_route. Therefore, by using a valid cast from rtnl_route to nl_object is a allowed if you view the libnl sources for creating the objects. By doing this, we can call the nl_object_get_id_attrs on the rtnl_route which is equivalent to the previous statement using route_obj_ops. Unfortunately I still have no idea how to test this but at least I've constructed this patch by manually inspecting the sources to libnl and ntrack. |
Fix ntrack for latest libnl release
ntrack compilation was broken with libnl 3.2.21 and later. This patch fixes the build to work with the new versions of libnl.