Re: [PATCH v6 05/17] hostapd: Set the correct key_type for key installs

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

 



On Sun, Sep 15, 2019 at 10:08:25PM +0200, Alexander Wetzel wrote:
> In addition to the set_key boolean this also sets the corresponding
> new variable key_type for all key installs.
> 
> Till set_tx is dropped drivers can use either set_tx or key_flag,
> allowing to seamless migrate to key_flag.

I'd assume this is talking about set_tx and key_type, not about
set_key or key_flag.

> diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
> @@ -286,7 +286,7 @@ static void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta)
>  		if (hostapd_drv_set_key(hapd->conf->iface, hapd, WPA_ALG_WEP,
>  					sta->addr, 0, 1, NULL, 0, ikey,
>  					hapd->conf->individual_wep_key_len,
> -					0)) {
> +					KEY_TYPE_DEFAULT)) {

Why would this use KEY_TYPE_DEFAULT instead of KEY_TYPE_PAIRWISE? This
operation is configuring a unicast WEP key for the specific station.
Sure, it was not called pairwise before RSN was added to the standard,
but this is a WEP key that is used for unicast frames only and there is
a separate WEP key from group-addressed frames.

> diff --git a/tests/hwsim/test_ap_ciphers.py b/tests/hwsim/test_ap_ciphers.py
> @@ -862,7 +862,7 @@ def test_ap_wpa2_delayed_m1_m3_zero_tk(dev, apdev):

> -    if "OK" not in hapd.request("SET_KEY 3 %s %d %d %s %s 0" % (addr, 0, 1, 6*"00", 16*"00")):
> +    if "OK" not in hapd.request("SET_KEY 3 %s %d %d %s %s %d" % (addr, 0, 1, 6*"00", 16*"00", 2)):

I'm moving this and the other related changes in 4/17 into a separate
patch (i.e., 4/17 uses 0 for everything as the key_type and does not
have the exception for hostapd_ctrl_set_key()).

-- 
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