Re: ssid with double space not stored correctly

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

 



On Sun, Dec 10, 2017 at 05:56:29PM +0100, Erich Titl wrote:
> I am running wpa_supplicant 2.6 on an embedded linux platform. It
> appears that ssid's with double white space is not correctly written to
> wpa_supplicant using wpa_cli
> 
> SALT# wpa_cli set_network 23 ssid \"NOS-CAFE DA  MARINA\"

Please note that this gets processed by the shell and since the full
SSID value was not quoted, the shell will parse this in a way that
removes duplicated whitespace between the command line arguments.

> It feels like double spaces are somehow suppressed in wpa_cli

wpa_cli does not do this, the shell command line parsing does.. You'll
get the exact same behavior with other programs like echo:

$ echo \"NOS-CAFE DA  MARINA\"
"NOS-CAFE DA MARINA"

$ echo '"NOS-CAFE DA  MARINA"'
"NOS-CAFE DA  MARINA"


wpa_cli does try to parse together the value from multiple command line
arguments, but it does not get knowledge of what kind of whitespace was
used between them, so it cannot build the correct value in some cases.
Providing the full value as a single command line argument (like that
second echo example above) is a more robust way of doing this.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
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