]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Restart pending CAC on interface enable
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Mon, 7 Jan 2019 10:58:08 +0000 (11:58 +0100)
committerJouni Malinen <j@w1.fi>
Mon, 7 Jan 2019 23:11:56 +0000 (01:11 +0200)
When an interface is re-enabled after it was disabled during CAC, it
won't ever get active since hostapd is waiting for a CAC_FINISHED while
kernel side is waiting for a CMD_RADAR_DETECT to start a CAC.

This commit checks for a pending CAC when an interface is enabled and if
so restarts its DFS processing.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
src/ap/drv_callbacks.c

index d49ad4c41f0b6510f05e13fe311ba56edbb0d29d..54be3b52439c0bad1f85d3722554795d82989d42 100644 (file)
@@ -1729,6 +1729,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                                hostapd_reconfig_encryption(hapd);
                        hapd->reenable_beacon = 1;
                        ieee802_11_set_beacon(hapd);
+#ifdef NEED_AP_MLME
+               } else if (hapd->disabled && hapd->iface->cac_started) {
+                       wpa_printf(MSG_DEBUG, "DFS: restarting pending CAC");
+                       hostapd_handle_dfs(hapd->iface);
+#endif /* NEED_AP_MLME */
                }
                break;
        case EVENT_INTERFACE_DISABLED: