Fix coverity CIDs 161048, 163895
[vpp.git] / src / vnet / ipsec / ipsec_api.c
index 49b475c..9c4ba52 100644 (file)
@@ -79,11 +79,7 @@ static void vl_api_ipsec_spd_add_del_t_handler
   vl_api_ipsec_spd_add_del_reply_t *rmp;
   int rv;
 
-#if DPDK > 0
   rv = ipsec_add_del_spd (vm, ntohl (mp->spd_id), mp->is_add);
-#else
-  rv = VNET_API_ERROR_UNIMPLEMENTED;
-#endif
 
   REPLY_MACRO (VL_API_IPSEC_SPD_ADD_DEL_REPLY);
 #endif
@@ -213,8 +209,7 @@ static void vl_api_ipsec_sad_add_del_entry_t_handler
   sa.crypto_key_len = mp->crypto_key_length;
   clib_memcpy (&sa.crypto_key, mp->crypto_key, sizeof (sa.crypto_key));
   /* check for unsupported integ-alg */
-  if (mp->integrity_algorithm < IPSEC_INTEG_ALG_NONE ||
-      mp->integrity_algorithm >= IPSEC_INTEG_N_ALG)
+  if (mp->integrity_algorithm >= IPSEC_INTEG_N_ALG)
     {
       clib_warning ("unsupported integ-alg: '%U'", format_ipsec_integ_alg,
                    mp->integrity_algorithm);