possible bug in driver_madwifi.c/wpa_driver_madwifi_scan()

Amin Abdul amin_abdul at hotmail.com
Sat May 12 14:42:20 EDT 2007

It seems that there is a bug in how 
driver_madwifi.c/wpa_driver_madwifi_scan() manage return logic.

For example, even if  wpa_driver_wext_set_ssid() failed we end up in calling 
ioctl(drv->sock, SIOCSIWSCAN, &iwr) is it intentional ?

The same is true for ioctl(drv->sock, SIOCSIWSCAN, 

static int
wpa_driver_madwifi_scan(void *priv, const u8 *ssid, size_t ssid_len)
	int ret = 0;

	if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
		ret = -1;

	if (ioctl(drv->sock, SIOCSIWSCAN, &iwr) < 0) {
		ret = -1;

	eloop_register_timeout(30, 0, wpa_driver_wext_scan_timeout, drv->wext,

	return ret;


See Fireworks On Live Image Search 

More information about the HostAP mailing list