Skip to contentSkip to conversation

nl80211: Add proper NL type for NL80211_ATTR_MPATH_NEXT_HOP

PATCH New Tamizh chelvam 1 participant 1 message Nov 2, 2019 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/wireless/nl80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
index d1451e7..1b51b59 100644
@@ -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 },
Signature · 1 line
1.7.9.5