[PATCH 2/9] nl80211: Support scanning as AP

Jouni Malinen j at w1.fi
Fri Oct 3 03:35:00 PDT 2025


On Fri, Jul 18, 2025 at 01:00:58PM +0200, Benjamin Berg wrote:
> If the kernel indicated support for scanning on AP interface,
> set NL80211_SCAN_FLAG_AP in the scan request.

> diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
> @@ -267,7 +267,8 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
> -	if (!drv->hostapd && is_ap_interface(drv->nlmode)) {
> +	if (drv->support_ap_scan ||
> +	    (!drv->hostapd && is_ap_interface(drv->nlmode))) {
>  		wpa_printf(MSG_DEBUG, "nl80211: Add NL80211_SCAN_FLAG_AP");
>  		scan_flags |= NL80211_SCAN_FLAG_AP;
>  	}

Why would this be done for all scan requests regardless of whether the
interface is in AP mode? That scan is documented to be dangerous and to
be used only when really needed..
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list