From patchwork Sat Dec 5 09:26:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 11953019 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61B14C433FE for ; Sat, 5 Dec 2020 09:52:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CE0622D2A for ; Sat, 5 Dec 2020 09:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726701AbgLEJvc (ORCPT ); Sat, 5 Dec 2020 04:51:32 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:43615 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728781AbgLEJgO (ORCPT ); Sat, 5 Dec 2020 04:36:14 -0500 X-Greylist: delayed 521 seconds by postgrey-1.27 at vger.kernel.org; Sat, 05 Dec 2020 04:36:14 EST Received: from isengard.fritz.box (unknown [87.147.53.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id E8C4C58007E; Sat, 5 Dec 2020 10:26:29 +0100 (CET) From: Markus Theil To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Markus Theil , Marc Rantanen Subject: [PATCH] iw: use correct type in policy check for mesh Date: Sat, 5 Dec 2020 10:26:15 +0100 Message-Id: <20201205092615.131561-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Tested-by: Marc Rantanen Signed-off-by: Markus Theil --- station.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/station.c b/station.c index b2c5b9c..bddea51 100644 --- 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;