aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <dmarion@me.com>2020-12-13 11:45:41 +0000
committerDamjan Marion <dmarion@me.com>2020-12-13 11:46:58 +0000
commit5e6d547798e1b1137130b76f2e634c459ce42561 (patch)
tree510345b4a602928abce0262028fa23cadf0c2fc0 /src
parentf0419a0c85606d9c07da3a972adc9f5f7d53337b (diff)
nat: revert 'fix byte order on ipfix message fields'
This reverts commit bfba2d555331ce67f707e608877e96dbd2aacd80. Reason for revert: breaks test test_nat44.TestNAT44.test_ipfix_max_sessions Change-Id: I6eed4d02835ab792e7e3491fc14240cc88a86710 Type: fix Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/nat/lib/ipfix_logging.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c
index 872d11bdfb5..2fb8912226d 100644
--- a/src/plugins/nat/lib/ipfix_logging.c
+++ b/src/plugins/nat/lib/ipfix_logging.c
@@ -780,7 +780,7 @@ nat_ipfix_logging_max_entries_per_usr (u32 thread_index,
vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
- u32 quota_event = clib_host_to_net_u32 (MAX_ENTRIES_PER_USER);
+ u32 quota_event = MAX_ENTRIES_PER_USER;
u16 template_id;
now = (u64) ((vlib_time_now (vm) - silm->vlib_time_0) * 1e3);
@@ -835,7 +835,6 @@ nat_ipfix_logging_max_entries_per_usr (u32 thread_index,
clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- limit = clib_host_to_net_u32 (limit);
clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
@@ -872,7 +871,7 @@ nat_ipfix_logging_max_ses (u32 thread_index, u32 limit, int do_flush)
vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
- u32 quota_event = clib_host_to_net_u32 (MAX_SESSION_ENTRIES);
+ u32 quota_event = MAX_SESSION_ENTRIES;
u16 template_id;
now = (u64) ((vlib_time_now (vm) - silm->vlib_time_0) * 1e3);
@@ -927,7 +926,6 @@ nat_ipfix_logging_max_ses (u32 thread_index, u32 limit, int do_flush)
clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- limit = clib_host_to_net_u32 (limit);
clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
@@ -961,7 +959,7 @@ nat_ipfix_logging_max_bib (u32 thread_index, u32 limit, int do_flush)
vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
- u32 quota_event = clib_host_to_net_u32 (MAX_BIB_ENTRIES);
+ u32 quota_event = MAX_BIB_ENTRIES;
u16 template_id;
now = (u64) ((vlib_time_now (vm) - silm->vlib_time_0) * 1e3);
@@ -1016,7 +1014,6 @@ nat_ipfix_logging_max_bib (u32 thread_index, u32 limit, int do_flush)
clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- limit = clib_host_to_net_u32 (limit);
clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);