Commit 3240eac4 authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by David S. Miller
Browse files

macsec: fix error message in macsec_add_rxsa and _txsa



The expected length is MACSEC_SALT_LEN, not MACSEC_SA_ATTR_SALT.

Fixes: 48ef50fa ("macsec: Netlink support of XPN cipher suites (IEEE 802.1AEbw)")
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f46040ee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1770,7 +1770,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) {
			pr_notice("macsec: nl: add_rxsa: bad salt length: %d != %d\n",
				  nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
				  MACSEC_SA_ATTR_SALT);
				  MACSEC_SALT_LEN);
			rtnl_unlock();
			return -EINVAL;
		}
@@ -2012,7 +2012,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) {
			pr_notice("macsec: nl: add_txsa: bad salt length: %d != %d\n",
				  nla_len(tb_sa[MACSEC_SA_ATTR_SALT]),
				  MACSEC_SA_ATTR_SALT);
				  MACSEC_SALT_LEN);
			rtnl_unlock();
			return -EINVAL;
		}