macsec: fix error message in macsec_add_rxsa and _txsa
[ Upstream commit3240eac4ff] The expected length is MACSEC_SALT_LEN, not MACSEC_SA_ATTR_SALT. Fixes:48ef50fa86("macsec: Netlink support of XPN cipher suites (IEEE 802.1AEbw)") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
54c295a30f
commit
0755c9d05a
@@ -1767,7 +1767,7 @@ static int macsec_add_rxsa(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (nla_len(tb_sa[MACSEC_SA_ATTR_SALT]) != MACSEC_SALT_LEN) {
|
if (nla_len(tb_sa[MACSEC_SA_ATTR_SALT]) != MACSEC_SALT_LEN) {
|
||||||
pr_notice("macsec: nl: add_rxsa: bad salt length: %d != %d\n",
|
pr_notice("macsec: nl: add_rxsa: bad salt length: %d != %d\n",
|
||||||
nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
|
nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
|
||||||
MACSEC_SA_ATTR_SALT);
|
MACSEC_SALT_LEN);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -2009,7 +2009,7 @@ static int macsec_add_txsa(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (nla_len(tb_sa[MACSEC_SA_ATTR_SALT]) != MACSEC_SALT_LEN) {
|
if (nla_len(tb_sa[MACSEC_SA_ATTR_SALT]) != MACSEC_SALT_LEN) {
|
||||||
pr_notice("macsec: nl: add_txsa: bad salt length: %d != %d\n",
|
pr_notice("macsec: nl: add_txsa: bad salt length: %d != %d\n",
|
||||||
nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
|
nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
|
||||||
MACSEC_SA_ATTR_SALT);
|
MACSEC_SALT_LEN);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user