aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ei/nat44_ei.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2021-10-21 13:00:27 +0200
committerOle Tr�an <otroan@employees.org>2021-11-10 10:48:19 +0000
commit9c25eb1f4876a399919782c97e116732ea2ee628 (patch)
tree82ec5f326d2ebb326983abe6b4d2595729af46d1 /src/plugins/nat/nat44-ei/nat44_ei.c
parent603231f447f197e7bc45bdb75bf5d77420e682b9 (diff)
nat: api autoendian fix
Fixed bad use of macros for autoendian API calls and updated tests for the new API. Removed sw_if_index check macro because of ntol conversion. Changed REPLY_MACRO to REPLY_MACRO_END to fix ntohl conversions. Type: fix Change-Id: I878a07b3f80fe03179feab60f0abc662f408a2c8 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44-ei/nat44_ei.c')
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/plugins/nat/nat44-ei/nat44_ei.c b/src/plugins/nat/nat44-ei/nat44_ei.c
index 694bc6bec5a..23f5a47464c 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei.c
+++ b/src/plugins/nat/nat44-ei/nat44_ei.c
@@ -610,7 +610,7 @@ nat44_ei_get_interface (nat44_ei_interface_t *interfaces, u32 sw_if_index)
return 0;
}
-static_always_inline int
+int
nat44_ei_add_interface (u32 sw_if_index, u8 is_inside)
{
const char *feature_name, *del_feature_name;
@@ -753,7 +753,7 @@ nat44_ei_add_interface (u32 sw_if_index, u8 is_inside)
return 0;
}
-static_always_inline int
+int
nat44_ei_del_interface (u32 sw_if_index, u8 is_inside)
{
const char *feature_name, *del_feature_name;
@@ -884,19 +884,6 @@ nat44_ei_del_interface (u32 sw_if_index, u8 is_inside)
}
int
-nat44_ei_add_del_interface (u32 sw_if_index, u8 is_inside, int is_del)
-{
- if (is_del)
- {
- return nat44_ei_del_interface (sw_if_index, is_inside);
- }
- else
- {
- return nat44_ei_add_interface (sw_if_index, is_inside);
- }
-}
-
-static_always_inline int
nat44_ei_add_output_interface (u32 sw_if_index)
{
nat44_ei_main_t *nm = &nat44_ei_main;
@@ -1000,7 +987,7 @@ nat44_ei_add_output_interface (u32 sw_if_index)
return 0;
}
-static_always_inline int
+int
nat44_ei_del_output_interface (u32 sw_if_index)
{
nat44_ei_main_t *nm = &nat44_ei_main;
@@ -1092,19 +1079,6 @@ nat44_ei_del_output_interface (u32 sw_if_index)
}
int
-nat44_ei_add_del_output_interface (u32 sw_if_index, int is_del)
-{
- if (is_del)
- {
- return nat44_ei_del_output_interface (sw_if_index);
- }
- else
- {
- return nat44_ei_add_output_interface (sw_if_index);
- }
-}
-
-int
nat44_ei_plugin_disable ()
{
nat44_ei_main_t *nm = &nat44_ei_main;