openwrtv4/package/network/utils/iwinfo/src
Jo-Philipp Wich eb02b887ff package: fix segfault of iwinfo.scanlist("radio0").
This is a bug revealed in r41830.

First, the static variable `char nif[IFNAMSIZ]` of nl80211_phy2ifname()
would be zeroed out if the argument is "wlan0" or the like.  This will
happen in the following call stack.

 nl80211_get_scanlist("radio0", buf, len);
   nl80211_phy2ifname("radio0")			// return static var nif with content "wlan0"
   nl80211_get_scanlist(nif, buf, len);		// tail call
     nl80211_get_mode(nif);
        nl80211_phy2ifname(nif);		// zero out nif

Later we try nl80211_ifadd("") which was supposed to create interface
"tmp.", but that won't happen because nl80211_msg() will put an invalid
ifidx 0 to the nlmsg.

Then iwinfo_ifup() and iwinfo_ifdown() would fail and happily
nl80211_get_scanlist() returned 0 and left *len undefined.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 42151
2014-08-12 11:14:11 +00:00
..
api iwinfo: update nl80211 api to the latest one 2014-06-02 13:10:53 +00:00
include iwinfo: add 802.11ac hwmode support 2014-06-02 13:10:49 +00:00
COPYING packages: sort network related packages into package/network/ 2012-10-10 12:32:29 +00:00
hardware.txt iwinfo: add Atheros AR9580 to hardware.txt 2014-06-02 13:10:44 +00:00
iwinfo_cli.c iwinfo: add 802.11ac hwmode support 2014-06-02 13:10:49 +00:00
iwinfo_lib.c iwinfo: keep an array of backends, reduce the number of ifdefs and hardcoded strcmp calls 2014-05-21 12:33:10 +00:00
iwinfo_lua.c package: fix segfault of iwinfo.scanlist("radio0"). 2014-08-12 11:14:11 +00:00
iwinfo_madwifi.c iwinfo: un-export internal api header files 2014-05-21 12:34:02 +00:00
iwinfo_nl80211.c package: fix segfault of iwinfo.scanlist("radio0"). 2014-08-12 11:14:11 +00:00
iwinfo_nl80211.h iwinfo: un-export internal api header files 2014-05-21 12:34:02 +00:00
iwinfo_utils.c iwinfo: fix secondary radios being misreported as ralink device 2014-07-25 14:36:43 +00:00
iwinfo_wext.c iwinfo: move wext_ops to iwinfo_wext.c, make functions static 2014-05-21 12:33:15 +00:00
iwinfo_wext.h iwinfo: un-export internal api header files 2014-05-21 12:34:02 +00:00
iwinfo_wext_scan.c iwinfo: move wext_ops to iwinfo_wext.c, make functions static 2014-05-21 12:33:15 +00:00
iwinfo_wl.c iwinfo: fix string format for country code 2014-07-02 21:43:17 +00:00
Makefile packages: sort network related packages into package/network/ 2012-10-10 12:32:29 +00:00