Need to set replayWindow and macSize to 0 when authentication algorithm is NULL for...
[keystone-rtos/netapi.git] / ti / runtime / netapi / src / netapi_sec.c
index 6af56e562ac3d0660303e29130c0c58eb64745cc..9b7ba92f7bcc9c25efb6d4d722d4432c4ea03cb9 100755 (executable)
@@ -129,6 +129,11 @@ nwalCreateSAParams_t    createParam =
     createParam.saIpSecParam.cipherMode = sa_info->cipherMode;
     createParam.saIpSecParam.esnLo = sa_info->esnLo;
     createParam.saIpSecParam.esnHi = sa_info->esnHi;
+     if  (sa_info->authMode == NWAL_SA_AALG_NULL)
+     {
+            createParam.saIpSecParam.replayWindow = 0;
+            createParam.saIpSecParam.macSize = 0;
+     }
     memcpy(&createParam.keyParam,key_params,sizeof(nwalSecKeyParams_t));
 
     if (route != NULL)