ipsec: return original SA create error for tunnel create 31/20131/2
authorNeale Ranns <nranns@cisco.com>
Fri, 14 Jun 2019 10:31:46 +0000 (10:31 +0000)
committerNeale Ranns <nranns@cisco.com>
Mon, 17 Jun 2019 15:15:30 +0000 (15:15 +0000)
rather than SRC/DST address error which is not so helpfull

Type: fix
Fixes: af3f0783

Change-Id: Ie2143e4e29de87d93e79bd96284c041bdbffd98e
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/ipsec/ipsec_if.c

index 8e0fba2..6627d29 100644 (file)
@@ -335,7 +335,7 @@ ipsec_add_del_tunnel_if_internal (vnet_main_t * vnm,
                         &args->local_ip, &t->input_sa_index);
 
       if (rv)
-       return VNET_API_ERROR_INVALID_SRC_ADDRESS;
+       return rv;
 
       ipsec_mk_key (&crypto_key,
                    args->local_crypto_key, args->local_crypto_key_len);
@@ -356,7 +356,7 @@ ipsec_add_del_tunnel_if_internal (vnet_main_t * vnm,
                         &args->remote_ip, &t->output_sa_index);
 
       if (rv)
-       return VNET_API_ERROR_INVALID_DST_ADDRESS;
+       return rv;
 
       /* copy the key */
       if (is_ip6)