]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add NLA_F_NESTED to nla_nest_start() with older libnl versions
authorJouni Malinen <jouni@codeaurora.org>
Mon, 17 Feb 2020 15:25:05 +0000 (17:25 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 17 Feb 2020 15:25:05 +0000 (17:25 +0200)
This is needed to work around a missing attribute that would cause
cfg80211 to reject some nl80211 commands (e.g.,
NL80211_ATTR_VENDOR_DATA) with new kernel versions that enforce netlink
attribute policy validation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/drivers/driver_nl80211.h

index e4d81b12503a67b4884f1e0334f8902c033304d2..6e6c872476218a40e683f8585cc5062e077ac672 100644 (file)
 #include "utils/list.h"
 #include "driver.h"
 
+#ifndef NL_CAPABILITY_VERSION_3_5_0
+#define nla_nest_start(msg, attrtype) \
+       nla_nest_start(msg, NLA_F_NESTED | (attrtype))
+#endif
+
 struct nl80211_global {
        void *ctx;
        struct dl_list interfaces;