]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Do not allow off channel when frequency is not specified
authorIlan Peer <ilan.peer@intel.com>
Wed, 29 Nov 2023 08:43:58 +0000 (10:43 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Dec 2023 18:35:21 +0000 (20:35 +0200)
Do not allow offchannel operation for action frame transmission if
no frequency is specified, as this doesn't make sense.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/drivers/driver_nl80211.c

index 03d54222bb52710ed6d58606297eb7b0f89eaa10..56c00736dfa419a877dd878c252e2a42aea2a41c 100644 (file)
@@ -9151,6 +9151,9 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
            bss->flink->beacon_set)
                offchanok = 0;
 
+       if (!freq && is_sta_interface(drv->nlmode))
+               offchanok = 0;
+
        wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "
                   "freq=%u MHz wait=%d ms no_cck=%d offchanok=%d)",
                   drv->ifindex, freq, wait_time, no_cck, offchanok);