summaryrefslogtreecommitdiffstats
path: root/extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp')
-rw-r--r--extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp b/extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp
index 24d1883ed75..db4e7fc796c 100644
--- a/extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp
+++ b/extras/vom/vom/vxlan_gbp_tunnel_cmds.cpp
@@ -24,9 +24,11 @@ namespace vxlan_gbp_tunnel_cmds {
create_cmd::create_cmd(HW::item<handle_t>& item,
const std::string& name,
const vxlan_tunnel::endpoint_t& ep,
+ bool is_l2,
handle_t mcast_itf)
: interface::create_cmd<vapi::Vxlan_gbp_tunnel_add_del>(item, name)
, m_ep(ep)
+ , m_is_l2(is_l2)
, m_mcast_itf(mcast_itf)
{
}
@@ -52,6 +54,8 @@ create_cmd::issue(connection& con)
payload.tunnel.encap_table_id = 0;
payload.tunnel.vni = m_ep.vni;
payload.tunnel.instance = ~0;
+ payload.tunnel.mode =
+ (m_is_l2 ? VXLAN_GBP_API_TUNNEL_MODE_L2 : VXLAN_GBP_API_TUNNEL_MODE_L3);
VAPI_CALL(req.execute());