Skip to contentSkip to conversation

cfg80211: fix a crash in the active monitor check

PATCH In review Felix Fietkau 2 participants 2 messages May 28, 2013 – May 29, 2013 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfg80211: fix a crash in the active monitor check

flags can be NULL

---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
index 820b756..ede00e2 100644
@@ -2391,7 +2391,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
 		change = true;
 	}
 
-	if ((*flags & NL80211_MNTR_FLAG_ACTIVE) &&
+	if (flags && (*flags & NL80211_MNTR_FLAG_ACTIVE) &&
 	    !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR))
 		return -EOPNOTSUPP;
 
Signature · 1 line
1.8.0.2
maintainer
#1 lore raw
Quoted 1 line · Felix Fietkau

flags can be NULL

I merged this into the original patch and also fixed the kernel-doc for you while at it.

johannes