nvethernet:macsec:Replay protection enable config

Issue: Replay protection is enabled by default though disabled from
supplicant configuration

Fix: If replay protection is enabled from supplcant use maximum
PN window

Bug 3673458

Change-Id: I5a2c3f0b6bca56831afb0e5f635dbdd8e8bc4db8
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2728326
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2022-06-14 11:00:35 +05:30
committed by Revanth Kumar Uppala
parent 118cdcebdc
commit 4c8ec560fa

View File

@@ -1391,7 +1391,13 @@ static int macsec_set_replay_prot(struct sk_buff *skb, struct genl_info *info)
goto exit;
}
macsec_pdata->pn_window = window;
/* If Replay protection is disabled from supplicant use maximum
* PN window as replay protecion is already enabled in macsec_init
*/
if (replay_prot == OSI_ENABLE)
macsec_pdata->pn_window = window;
else
macsec_pdata->pn_window = OSI_PN_MAX_DEFAULT;
exit:
PRINT_EXIT();