|
@@ -33,6 +33,7 @@
|
|
|
#include <net/net_namespace.h>
|
|
|
#include <net/netns/generic.h>
|
|
|
#include <linux/rhashtable.h>
|
|
|
+#include <linux/nospec.h>
|
|
|
#include "mac80211_hwsim.h"
|
|
|
|
|
|
#define WARN_QUEUE 100
|
|
@@ -3229,6 +3230,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
|
|
kfree(hwname);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
+
|
|
|
+ idx = array_index_nospec(idx,
|
|
|
+ ARRAY_SIZE(hwsim_world_regdom_custom));
|
|
|
param.regd = hwsim_world_regdom_custom[idx];
|
|
|
}
|
|
|
|