Thread (9 messages) read the whole thread 9 messages, 2 authors, 2021-09-23

Re: [PATCH iw 1/4] iw: nl80211: add NLA_F_NESTED to nla_nest_start() with older libnl versions

From: Gokul Sivakumar <hidden>
Date: 2021-09-23 15:53:30

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help