]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: use correct type in policy check for mesh
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Sat, 5 Dec 2020 09:26:15 +0000 (10:26 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 11 Dec 2020 12:06:09 +0000 (13:06 +0100)
NL80211_STA_INFO_CONNECTED_TO_AS and NL80211_STA_INFO_CONNECTED_TO_GATE
are defined as u8 in kernel, but were checked against NLA_FLAG.

This fixes:

root@openwrt:~# iw dev wlan0-mesh station
failed to parse nested attributes!
failed to parse nested attributes!
failed to parse nested attributes!

Reported-by: Marc Rantanen <marc@eciceron.se>
Tested-by: Marc Rantanen <marc@eciceron.se>
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20201205092615.131561-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
station.c

index b2c5b9c205054c6689227eea0c4e69a5f14d5a62..bddea51815eef7267567b1371a6729c49a881c65 100644 (file)
--- a/station.c
+++ b/station.c
@@ -329,8 +329,8 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                [NL80211_STA_INFO_ACK_SIGNAL] = {.type = NLA_U8 },
                [NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
                [NL80211_STA_INFO_AIRTIME_LINK_METRIC] = { .type = NLA_U32 },
-               [NL80211_STA_INFO_CONNECTED_TO_AS] = { .type = NLA_FLAG },
-               [NL80211_STA_INFO_CONNECTED_TO_GATE] = { .type = NLA_FLAG },
+               [NL80211_STA_INFO_CONNECTED_TO_AS] = { .type = NLA_U8 },
+               [NL80211_STA_INFO_CONNECTED_TO_GATE] = { .type = NLA_U8 },
        };
        char *chain;
        struct timeval now;