Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2021-03-25 15:31:22 -07:00
1022 changed files with 8231 additions and 4660 deletions

View File

@@ -2900,17 +2900,22 @@ int tipc_nl_node_dump_monitor_peer(struct sk_buff *skb,
#ifdef CONFIG_TIPC_CRYPTO
static int tipc_nl_retrieve_key(struct nlattr **attrs,
struct tipc_aead_key **key)
struct tipc_aead_key **pkey)
{
struct nlattr *attr = attrs[TIPC_NLA_NODE_KEY];
struct tipc_aead_key *key;
if (!attr)
return -ENODATA;
*key = (struct tipc_aead_key *)nla_data(attr);
if (nla_len(attr) < tipc_aead_key_size(*key))
if (nla_len(attr) < sizeof(*key))
return -EINVAL;
key = (struct tipc_aead_key *)nla_data(attr);
if (key->keylen > TIPC_AEAD_KEYLEN_MAX ||
nla_len(attr) < tipc_aead_key_size(key))
return -EINVAL;
*pkey = key;
return 0;
}