X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fvxlan_tunnel_cmds.cpp;h=24879ce4d45af9dff9362f45cfa2520e0136a761;hb=refs%2Fchanges%2F75%2F19575%2F3;hp=ca4ccf3c38a6683c7c2605533b2b9f2e13d50026;hpb=164e5f8c63652028ecb9c3570e1ea8618b163071;p=vpp.git diff --git a/extras/vom/vom/vxlan_tunnel_cmds.cpp b/extras/vom/vom/vxlan_tunnel_cmds.cpp index ca4ccf3c38a..24879ce4d45 100644 --- a/extras/vom/vom/vxlan_tunnel_cmds.cpp +++ b/extras/vom/vom/vxlan_tunnel_cmds.cpp @@ -22,9 +22,11 @@ namespace vxlan_tunnel_cmds { create_cmd::create_cmd(HW::item& item, const std::string& name, - const vxlan_tunnel::endpoint_t& ep) + const vxlan_tunnel::endpoint_t& ep, + handle_t mcast_itf) : interface::create_cmd(item, name) , m_ep(ep) + , m_mcast_itf(mcast_itf) { } @@ -44,16 +46,16 @@ create_cmd::issue(connection& con) payload.is_ipv6 = 0; to_bytes(m_ep.src, &payload.is_ipv6, payload.src_address); to_bytes(m_ep.dst, &payload.is_ipv6, payload.dst_address); - payload.mcast_sw_if_index = ~0; + payload.mcast_sw_if_index = m_mcast_itf.value(); payload.encap_vrf_id = 0; payload.decap_next_index = ~0; payload.vni = m_ep.vni; VAPI_CALL(req.execute()); - m_hw_item = wait(); + wait(); - if (m_hw_item) { + if (rc_t::OK == m_hw_item.rc()) { insert_interface(); } @@ -64,7 +66,8 @@ std::string create_cmd::to_string() const { std::ostringstream s; - s << "vxlan-tunnel-create: " << m_hw_item.to_string() << m_ep.to_string(); + s << "vxlan-tunnel-create: " << m_hw_item.to_string() << " " + << m_ep.to_string(); return (s.str()); }