]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Remove not needed netlink key attribute
authorAlexander Wetzel <alexander@wetzel-home.de>
Wed, 4 Mar 2020 17:16:54 +0000 (18:16 +0100)
committerJouni Malinen <j@w1.fi>
Wed, 4 Mar 2020 22:36:00 +0000 (00:36 +0200)
Calling NL80211_CMD_NEW_KEY with NL80211_KEY_DEFAULT_TYPES attributes is
pointless. The information is not expected and therefore the kernel
never forwards it to the drivers. That attribute is used with
NL80211_CMD_SET_KEY.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
src/drivers/driver_nl80211.c

index 2e61eb7e1116a1493ed6d21fb5013b21457f2555..94c56d0075a1959aaa260f286158115241980b1b 100644 (file)
@@ -3142,15 +3142,7 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
                                goto fail;
                }
        } else if (addr && is_broadcast_ether_addr(addr)) {
-               struct nlattr *types;
-
                wpa_printf(MSG_DEBUG, "   broadcast key");
-
-               types = nla_nest_start(key_msg, NL80211_KEY_DEFAULT_TYPES);
-               if (!types ||
-                   nla_put_flag(key_msg, NL80211_KEY_DEFAULT_TYPE_MULTICAST))
-                       goto fail;
-               nla_nest_end(key_msg, types);
        }
        if (nla_put_u8(key_msg, NL80211_KEY_IDX, key_idx) ||
            nla_put_nested(msg, NL80211_ATTR_KEY, key_msg))