]> git.baikalelectronics.ru Git - kernel.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:08:53 +0000 (23:08 +0200)
commita698195f3a6033bf1efa7ae165d44352296cf1b0
treed73824f988eca63812958988591937b443155eaa
parent0d86ad068c3e30bc0ce78c9bc4e42bb25a47bd32
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