]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: mscc: macsec: reject PN update requests
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Thu, 5 Oct 2023 18:06:35 +0000 (21:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2023 21:05:34 +0000 (23:05 +0200)
commit935a15334d77b78b15629ae0753ee9bc5ebf012d
tree2f27291ffff48b62c46a0834e4cad64a35d83b46
parent667fe9101a3abb08a684614ea393921eaa9b981f
net: phy: mscc: macsec: reject PN update requests

[ Upstream commit e0a8c918daa58700609ebd45e3fcd49965be8bbc ]

Updating the PN is not supported.
Return -EINVAL if update_pn is true.

The following command succeeded, but it should fail because the driver
does not update the PN:
ip macsec set macsec0 tx sa 0 pn 232 on

Fixes: 28c5107aa904 ("net: phy: mscc: macsec support")
Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/mscc/mscc_macsec.c