--- zzzz-none-000/linux-4.1.52/net/key/af_key.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/key/af_key.c 2022-03-02 11:37:13.000000000 +0000 @@ -2771,6 +2771,10 @@ int err, err2; err = xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, true); +#if defined(CONFIG_BCM_KF_SPU) && (defined(CONFIG_BCM_SPU) || defined(CONFIG_BCM_SPU_MODULE)) + if (err == 0) + xfrm_garbage_collect(net); +#endif err2 = unicast_flush_resp(sk, hdr); if (err || err2) { if (err == -ESRCH) /* empty table - old silent behavior */