[PATCH] fix setting transmit key index with older orinoco/prism54 drivers

Dan Williams dcbw
Thu Jan 3 09:40:33 PST 2008


On Thu, 2008-01-03 at 12:11 -0500, Dan Williams wrote:
> I can't see why this is a problem with recent kernels, since both the
> orinoco and prism54 drivers seem to handle this case correctly from a
> scan of their IWENCODE handlers.  However, it was certainly an issue
> with older drivers for these cards, where they would reject attempts to
> set the transmit key because they expected that the key would be NULL if
> the key length was 0.

As a (mediocre) reference for this issue:

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/37396

Dan

> I believe the regression possibility is small, because (a) it only
> affects drivers that don't support IWENCODEEXT of which there are few,
> and (b) we've been running it in Fedora for almost 2 years now.
> 
> 
> diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
> index f8eb29e..97b0169 100644
> --- a/src/drivers/driver_wext.c
> +++ b/src/drivers/driver_wext.c
> @@ -1778,7 +1778,7 @@ int wpa_driver_wext_set_key(void *priv, wpa_alg alg,
>  		os_memset(&iwr, 0, sizeof(iwr));
>  		os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
>  		iwr.u.encoding.flags = key_idx + 1;
> -		iwr.u.encoding.pointer = (caddr_t) key;
> +		iwr.u.encoding.pointer = (caddr_t) NULL;
>  		iwr.u.encoding.length = 0;
>  		if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) {
>  			perror("ioctl[SIOCSIWENCODE] (set_tx)");
> 
> 
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap





More information about the Hostap mailing list