Re: [PATCH] Show [UTF-8] flag if the SSID is reported as UTF-8

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

 



On Mon, Jun 25, 2018 at 10:24 PM Jouke Witteveen <j.witteveen@xxxxxxxxx> wrote:
>
> Signed-off-by: Jouke Witteveen <j.witteveen@xxxxxxxxx>
> ---
>
> I am not sure what decides which flags to show. This might be useful
> information for scripts that process SSIDs. However, I found that in my
> environment, no APs appear to actually set the UTF-8 field.
>
> Regards,
> - Jouke
>
>  wpa_supplicant/ctrl_iface.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> index fe39c25b7..8a922df47 100644
> --- a/wpa_supplicant/ctrl_iface.c
> +++ b/wpa_supplicant/ctrl_iface.c
> @@ -2879,6 +2879,13 @@ static int wpa_supplicant_ctrl_iface_scan_result(
>                         return -1;
>                 pos += ret;
>         }
> +       ie = wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB);
> +       if (ie && ie[1] >= 6 && ie[8] & BIT(1)) { /* Bit 48 - UTF-8 SSID */

Oops! That should be BIT(0). In my testing I used 0x01, but at the
last moment I realized that this would be a good place to use the BIT
macro.
The rest of the code is a bit inconsistent in this matter, with
wpa_supplicant/bss.c using the most verbose form:

WPA_GET_LE16(ie + 2) & BIT(...)

Before messing about with new versions of this patch, I would like to
hear what others think about it.

Regards,
- Jouke

> +               ret = os_snprintf(pos, end - pos, "[UTF-8]");
> +               if (os_snprintf_error(end - pos, ret))
> +                       return -1;
> +               pos += ret;
> +       }
>  #ifdef CONFIG_HS20
>         if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE) && ie2) {
>                 ret = os_snprintf(pos, end - pos, "[HS20]");
> --
> 2.18.0
>

_______________________________________________
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