On Thu, Sep 23, 2021 at 01:36:01PM +0200, Johannes Berg wrote:
Applied 2-4, but
quoted
+#ifndef NL_CAPABILITY_VERSION_3_5_0
I can find no evidence of that symbol ever existing anywhere?
johannes
The symbol NL_CAPABILITY_VERSION_3_5_0 is part of the libnl library and
this will be defined when using the libnl library version >= 3.5.0.
From libnl 3.5.0, the library itself handles setting NLA_F_NESTED flag
when using nla_nest_start() lib function. Please refer the
commit 7de65a0 ("attr: mark nested attributes as NLA_F_NESTED") in libnl
gitub tree (https://github.com/thom311/libnl/commit/7de65a0).
With this new code changes in iw.h, it will helpful if "iw" uses older
(< 3.5.0) libnl versions. In such cases NL_CAPABILITY_VERSION_3_5_0 will
not be defined in libnl and so iw itself will set the NLA_F_NESTED flag
when invoking the lib function nla_nest_start().
And hostapd/supplicant already started following the same approach.
Gokul