- &a->local_ip, &a->remote_ip, 0, 0, &sw_if_index);
+ &a->local_ip, &a->remote_ip, 0,
+ TUNNEL_ENCAP_DECAP_FLAG_NONE, IP_DSCP_CS0,
+ TUNNEL_MODE_P2P, &sw_if_index);
+
+ if (rv == VNET_API_ERROR_IF_ALREADY_EXISTS)
+ {
+ p = hash_get (km->sw_if_indices, sw_if_index);
+ if (p)
+ /* interface is managed by IKE; proceed with updating SAs */
+ rv = 0;
+ }
+
+ if (rv)
+ {
+ clib_warning ("installing ipip tunnel failed! loc:%U rem:%U",
+ format_ip4_address, &a->local_ip,
+ format_ip4_address, &a->remote_ip);
+ return;
+ }