Potential bug on limited output with `wpa_cli list_networks`

Luke Swart luke at lukeswart.net
Sat Oct 1 15:55:55 PDT 2016


Hi all,

Is there a way to make `wpa_cli list_networks` output all of my
configured networks? I think I am encountering a bug where the output of
`wpa_cli list_networks` is limited to ~125 networks. I have ~150
networks configured under my
`/etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf`, so my last ~25
networks are not being listed by wpa_cli's list_networks.

And Earnestly pointed out that this might be the section of code that is
limiting the output:
https://w1.fi/cgit/hostap/tree/wpa_supplicant/wpa_cli.c#n217 Perhaps it
has something to do with the buffer being limited to 4096 chars?

If interested, here is a comment about the bigger problem that I am
trying to solve:
https://gist.github.com/buhman/7162560#gistcomment-1878112 where I am
trying to search for a network's id (which is an integer that is
assigned from wpa_cli) by searching for the SSID. For example, if I want
to enable/disable a network called "tullys coffeehouse", I'll need to
grep/search my list of networks for something like "tully", get the id
(ie 144), then run `wpa_cli enable_network 144`.

Any help or suggestions would be appreciated.

Thanks,
Luke






More information about the Hostap mailing list