Re: [PATCH] Return with error when trying to set invalid WEP key length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 20, 2016 at 05:02:32PM +0530, Saurav Babu wrote:
> While trying to set WEP key an invalid key length can be set, but
> set command returns "OK". User is unable to know about the invalid WEP
> key length. This patch returns "FAIL" so that user can correct WEP key.

I think this no-rejection was done by design to avoid issues in starting
wpa_supplicant in some cases. See the commit message that added this for
more details:
http://w1.fi/cgit/hostap/commit/?id=fea7c3a0558787d6cc89b93207a612607f04d665

> diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
> @@ -1563,6 +1563,7 @@ static int wpa_config_parse_wep_key(u8 *key, size_t *len, int line,
>  		wpa_printf(MSG_ERROR, "Line %d: Invalid WEP key length %u - "
>  			   "this network block will be ignored",
>  			   line, (unsigned int) *len);
> +		return -1;
>  	}

Taken into account that earlier commit message, I don't think I want to
do this for configuration file parsing. I would be fine with a change
that makes the SET_NETWORK command return FAIL with an invalid WEP key
length, but this would still need to allow wpa_supplicant to start with
an configuration file that uses invalid WEP key length to maintain the
workaround for issues on some devices.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux