aboutsummaryrefslogtreecommitdiffstats
path: root/vpp/vpp-api
diff options
context:
space:
mode:
Diffstat (limited to 'vpp/vpp-api')
-rw-r--r--vpp/vpp-api/api.c15
-rw-r--r--vpp/vpp-api/vpe.api2
2 files changed, 17 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index f6b1b739..6a5a152e 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -4329,6 +4329,20 @@ static void vl_api_l2tpv3_create_tunnel_t_handler
goto out;
}
+ u32 encap_fib_index;
+
+ if (mp->encap_vrf_id != ~0) {
+ uword *p;
+ ip6_main_t *im = &ip6_main;
+ if (!(p = hash_get (im->fib_index_by_table_id, ntohl(mp->encap_vrf_id)))) {
+ rv = VNET_API_ERROR_NO_SUCH_FIB;
+ goto out;
+ }
+ encap_fib_index = p[0];
+ } else {
+ encap_fib_index = ~0;
+ }
+
rv = create_l2tpv3_ipv6_tunnel (lm,
(ip6_address_t *) mp->client_address,
(ip6_address_t *) mp->our_address,
@@ -4337,6 +4351,7 @@ static void vl_api_l2tpv3_create_tunnel_t_handler
clib_net_to_host_u64(mp->local_cookie),
clib_net_to_host_u64(mp->remote_cookie),
mp->l2_sublayer_present,
+ encap_fib_index,
&sw_if_index);
out:
diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api
index 25e6ebaa..841f3088 100644
--- a/vpp/vpp-api/vpe.api
+++ b/vpp/vpp-api/vpe.api
@@ -1694,6 +1694,7 @@ define dhcp_proxy_config_2_reply {
@param remote_session_id - remote tunnel session id
@param local_cookie - local tunnel cookie
@param l2_sublayer_present - l2 sublayer is present in packets if non-zero
+ @param encap_vrf_id - fib identifier used for outgoing encapsulated packets
*/
define l2tpv3_create_tunnel {
u32 client_index;
@@ -1706,6 +1707,7 @@ define l2tpv3_create_tunnel {
u64 local_cookie;
u64 remote_cookie;
u8 l2_sublayer_present;
+ u32 encap_vrf_id;
};
/** \brief l2tpv3 tunnel interface create response