Skip to content

platform/netlink: mark nested netlink attribute with NLA_F_NESTED

Thomas Haller requested to merge th/platform-netlink-nested-flag into master

Kernel 5.2 is starting to add more strict checking for the netlink message. In particular, for certain API it checks now that NLA_F_NESTED flag is set for nested attributes ([1]).

Note that libnl3 does not ever set this flag, and since our netlink implementation is copied from there, certain netlink messages are now rejected as invalid.

On the other hand, libmnl always adds this flag ([2]). So we should do that as well.

In particular, this affects the WireGuard netlink API ([3]).

Edited by Thomas Haller

Merge request reports