On Wed, 2023-07-12 at 10:38 +0200, Koen Vandeputte wrote:
Executing command NL80211_CMD_GET_WIPHY and parsing it's output natively without libnl shows following attributes as part of the nl80211 generated netlink message (part 16):
GetWiphy: Type: 1 GetWiphy: Type: 2 GetWiphy: Type: 46 GetWiphy: Type: 33074 <-- wrong enum value, above MAX also ..
That's not wrong, that's just NLA_F_NESTED | NL80211_ATTR_MBSSID_CONFIG, since it *is* in fact a nested attribute.
Switching to nla_nest_start_noflag() which ommits the NLA_F_NESTED flag (like most other similar functions do) fixes this:
GetWiphy: Type: 1 GetWiphy: Type: 2 GetWiphy: Type: 46 GetWiphy: Type: 306 <-- correct enum value GetWiphy: Type: 316
Let's say it _changes_ it, but it doesn't _fix_ it, since it's not broken.
Using nla_nest_start_noflag() is a legacy thing, it shouldn't be done any more. You need to update your userspace, I'm not applying this patch.
johannes