diff options
Diffstat (limited to 'extras/vom')
-rw-r--r-- | extras/vom/vom/nat_binding.cpp | 6 | ||||
-rw-r--r-- | extras/vom/vom/nat_binding_cmds.cpp | 18 | ||||
-rw-r--r-- | extras/vom/vom/nat_static_cmds.cpp | 4 |
3 files changed, 11 insertions, 17 deletions
diff --git a/extras/vom/vom/nat_binding.cpp b/extras/vom/vom/nat_binding.cpp index a3fdee77be4..3c3d8261d67 100644 --- a/extras/vom/vom/nat_binding.cpp +++ b/extras/vom/vom/nat_binding.cpp @@ -225,7 +225,7 @@ nat_binding::event_handler::handle_populate(const client_db::key_t& key) if (itf) { nat_binding nb(*itf, direction_t::INPUT, l3_proto_t::IPV4, - zone_t::from_vpp(payload.flags & NAT_IS_INSIDE)); + zone_t::from_vpp(payload.is_inside)); OM::commit(key, nb); } else { VOM_LOG(log_level_t::ERROR) << "nat-binding-input-44 no sw_if_index: " @@ -245,7 +245,7 @@ nat_binding::event_handler::handle_populate(const client_db::key_t& key) std::shared_ptr<interface> itf = interface::find(payload.sw_if_index); if (itf) { nat_binding nb(*itf, direction_t::OUTPUT, l3_proto_t::IPV4, - zone_t::from_vpp(payload.flags & NAT_IS_INSIDE)); + zone_t::from_vpp(payload.is_inside)); OM::commit(key, nb); } else { VOM_LOG(log_level_t::ERROR) << "nat-binding-output-44 no sw_if_index: " @@ -265,7 +265,7 @@ nat_binding::event_handler::handle_populate(const client_db::key_t& key) std::shared_ptr<interface> itf = interface::find(payload.sw_if_index); if (itf) { nat_binding nb(*itf, direction_t::INPUT, l3_proto_t::IPV6, - zone_t::from_vpp(payload.flags & NAT_IS_INSIDE)); + zone_t::from_vpp(payload.is_inside)); OM::commit(key, nb); } else { VOM_LOG(log_level_t::ERROR) << "nat-binding-input-66 no sw_if_index: " diff --git a/extras/vom/vom/nat_binding_cmds.cpp b/extras/vom/vom/nat_binding_cmds.cpp index 4e69a67f2af..d67a0828003 100644 --- a/extras/vom/vom/nat_binding_cmds.cpp +++ b/extras/vom/vom/nat_binding_cmds.cpp @@ -39,8 +39,7 @@ bind_44_input_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 1; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -80,8 +79,7 @@ unbind_44_input_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 0; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -121,8 +119,7 @@ bind_44_output_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 1; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -162,8 +159,7 @@ unbind_44_output_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 0; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -267,8 +263,7 @@ bind_66_input_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 1; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -310,8 +305,7 @@ unbind_66_input_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 0; - payload.flags = (vapi_enum_nat_config_flags)( - nat_binding::zone_t::INSIDE == m_zone ? NAT_IS_INSIDE : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); diff --git a/extras/vom/vom/nat_static_cmds.cpp b/extras/vom/vom/nat_static_cmds.cpp index 0c4d7283ea6..299f2f5f328 100644 --- a/extras/vom/vom/nat_static_cmds.cpp +++ b/extras/vom/vom/nat_static_cmds.cpp @@ -45,7 +45,7 @@ create_44_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 1; - payload.flags = NAT_IS_ADDR_ONLY; + payload.addr_only = 1; payload.local_port = 0; payload.external_port = 0; payload.vrf_id = m_id; @@ -94,7 +94,7 @@ delete_44_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 0; - payload.flags = NAT_IS_ADDR_ONLY; + payload.addr_only = 1; payload.local_port = 0; payload.external_port = 0; payload.vrf_id = m_id; |