2019-11-02 06:17:36

by Tamizh chelvam

[permalink] [raw]
Subject: [PATCH] nl80211: Add proper NL type for NL80211_ATTR_MPATH_NEXT_HOP

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 <[email protected]>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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 },
--
1.7.9.5