mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: phy: mscc: macsec: reject PN update requests
[ Upstream commite0a8c918da] 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:28c5107aa9("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0d86ad068c
commit
a698195f3a
@@ -844,6 +844,9 @@ static int vsc8584_macsec_upd_rxsa(struct macsec_context *ctx)
|
||||
struct macsec_flow *flow;
|
||||
int ret;
|
||||
|
||||
if (ctx->sa.update_pn)
|
||||
return -EINVAL;
|
||||
|
||||
flow = vsc8584_macsec_find_flow(ctx, MACSEC_INGR);
|
||||
if (IS_ERR(flow))
|
||||
return PTR_ERR(flow);
|
||||
@@ -897,6 +900,9 @@ static int vsc8584_macsec_upd_txsa(struct macsec_context *ctx)
|
||||
struct macsec_flow *flow;
|
||||
int ret;
|
||||
|
||||
if (ctx->sa.update_pn)
|
||||
return -EINVAL;
|
||||
|
||||
flow = vsc8584_macsec_find_flow(ctx, MACSEC_EGR);
|
||||
if (IS_ERR(flow))
|
||||
return PTR_ERR(flow);
|
||||
|
||||
Reference in New Issue
Block a user