ipsec: Honour the renumber argument when selecting show instnace 57/23557/2
authorNeale Ranns <nranns@cisco.com>
Wed, 20 Nov 2019 08:34:58 +0000 (08:34 +0000)
committerDamjan Marion <dmarion@me.com>
Wed, 20 Nov 2019 17:37:39 +0000 (17:37 +0000)
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: If41f154c354772f5b32cfd35ea231b8f59c2c0c5

src/vnet/ipsec/ipsec_api.c

index a959ac6..6784f0b 100644 (file)
@@ -789,7 +789,7 @@ vl_api_ipsec_tunnel_if_add_del_t_handler (vl_api_ipsec_tunnel_if_add_del_t *
       // remote = input, local = output
       /* create an ip-ip tunnel, then the two SA, then bind them */
       rv = ipip_add_tunnel (transport,
-                           ntohl (mp->show_instance),
+                           (mp->renumber ? ntohl (mp->show_instance) : ~0),
                            &local_ip,
                            &remote_ip, fib_index, 0, &sw_if_index);