possible bug in driver_madwifi.c/wpa_driver_madwifi_scan()

Amin Abdul amin_abdul
Sat May 12 11:42:20 PDT 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, 
&iwr)/eloop_register_timeout()

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) {
		perror("ioctl[SIOCSIWSCAN]");
		ret = -1;
	}

	...
	eloop_register_timeout(30, 0, wpa_driver_wext_scan_timeout, drv->wext,
			       drv->ctx);

	return ret;
}

/Amin

_________________________________________________________________
See Fireworks On Live Image Search 
http://search.live.com/images/results.aspx?q=Fireworks&mkt=en-ca&FORM=SERNEP





More information about the Hostap mailing list