Re: [PATCH] Dont exceed scan ssid max size advertised by driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 30, 2016 at 9:29 AM, Undekari, Sunil Dutt
<usdutt@xxxxxxxxxxxxxxxx> wrote:
> I did discuss with Jouni earlier for a similar fix and his response was "Reserving an entry for WILDCARD_SSID_SCAN in this manner would be problematic since it would not allow even a single specific SSID to be scanned for with drivers that support only a single SSID per request.".

We can restrict proposed patch only for cases when max_ssid > 1.

> I agree with this and IMO , the number of hidden network ID's provided via the control interface should ensure to have a groom for this "wildcard" scan ssid entry ( the number should be one less than the max_size advertised by the driver).
> This also asks for a new control interface command in wpa_supplicant to get the max_size supported by driver.
> I don't see any other option , if the hidden_ssids have to be provided through the control interface.
>
> Regards,
> Sunil
>
>
>
> -----Original Message-----
> From: Hostap [mailto:hostap-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Roshan Pius
> Sent: Thursday, June 30, 2016 5:25 AM
> To: hostap@xxxxxxxxxxxxxxxxxxx
> Cc: Roshan Pius <rpius@xxxxxxxxxx>
> Subject: [PATCH] Dont exceed scan ssid max size advertised by driver
>
> Currently |wpa_set_scan_ssids| fully exhausts
> |wpa_driver_scan_params.ssid| list when hidden network ID's
> are provided via the control interface. This results in us exceeding the max size for the list advertised by the driver when we add the "wildcard" scan ssid entry. So, ensure that we leave space for one more scan ssid entry in the list when we exit out of |wpa_set_scan_ssids|.
>
> Signed-off-by: Roshan Pius <rpius@xxxxxxxxxx>
> ---
>  wpa_supplicant/scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 7a52826..8a29522 100644
> --- a/wpa_supplicant/scan.c
> +++ b/wpa_supplicant/scan.c
> @@ -593,7 +593,7 @@ static void wpa_set_scan_ssids(struct wpa_supplicant *wpa_s,
>                 if (j < params->num_ssids)
>                         continue; /* already in the list */
>
> -               if (params->num_ssids + 1 > max_ssids) {
> +               if (params->num_ssids + 1 >= max_ssids) {
>                         wpa_printf(MSG_DEBUG,
>                                    "Over max scan SSIDs for manual request");
>                         break;
> --
> 2.8.0.rc3.226.g39d4020
>
>
> _______________________________________________
> Hostap mailing list
> Hostap@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/hostap
>
> _______________________________________________
> Hostap mailing list
> Hostap@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/hostap

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux