diff mbox series

nl80211: Add proper NL type for NL80211_ATTR_MPATH_NEXT_HOP

Message ID 1572675349-31733-1-git-send-email-tamizhr@codeaurora.org (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series nl80211: Add proper NL type for NL80211_ATTR_MPATH_NEXT_HOP | expand

Commit Message

Tamizh chelvam Nov. 2, 2019, 6:15 a.m. UTC
Assign NL type as NLA_EXACT_LEN_WARN and len as ETH_AELN
for NL80211_ATTR_MPATH_NEXT_HOP attribute to avoid
NL warning message like below during mpath set command.

"netlink: 'iw': attribute type 26 has an invalid length."

There is no functionality issue due to this warning message.

Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
---
 net/wireless/nl80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d1451e7..1b51b59 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -393,7 +393,7 @@  static int validate_ie_attr(const struct nlattr *attr,
 	[NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ },
 	[NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY,
 				   .len = IEEE80211_MAX_MESH_ID_LEN },
-	[NL80211_ATTR_MPATH_NEXT_HOP] = { .type = NLA_U32 },
+	[NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR,
 
 	[NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 },
 	[NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED },