Message ID | 20200819084648.13956-1-johannes@sipsolutions.net (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Johannes Berg |
Headers | show |
Series | cfg80211: regulatory: reject invalid hints | expand |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 35b8847a2f6d..117a28d7237d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2946,6 +2946,9 @@ int regulatory_hint_user(const char *alpha2, if (WARN_ON(!alpha2)) return -EINVAL; + if (!is_world_regdom(user_alpha2) && !is_an_alpha2(user_alpha2)) + return -EINVAL; + request = kzalloc(sizeof(struct regulatory_request), GFP_KERNEL); if (!request) return -ENOMEM;