aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorAlexander Chernavin <achernavin@netgate.com>2020-11-05 02:53:57 -0500
committerMatthew Smith <mgsmith@netgate.com>2020-11-05 16:37:28 +0000
commite019cacbe2399fadd41b3f22b6837431dd631e2a (patch)
tree0fc6041f19969a794418c04c67a433be1c656fdc /src/plugins/nat
parent587f9130424fd451e4ba823240d02f655fb197d1 (diff)
nat: fix byte order of vrf_id in logging
Type: fix Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I9930a2a90caa78e848fe657ab2da863467be41ea
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/lib/ipfix_logging.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c
index 7226fb72086..60b3c1f77a2 100644
--- a/src/plugins/nat/lib/ipfix_logging.c
+++ b/src/plugins/nat/lib/ipfix_logging.c
@@ -658,6 +658,7 @@ nat_ipfix_logging_nat44_ses (u32 thread_index, u8 nat_event, u32 src_ip,
clib_memcpy_fast (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
offset += sizeof (nat_src_port);
+ vrf_id = clib_host_to_net_u32 (vrf_id);
clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);
@@ -1111,6 +1112,7 @@ nat_ipfix_logging_nat64_bibe (u32 thread_index, u8 nat_event,
clib_memcpy_fast (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
offset += sizeof (nat_src_port);
+ vrf_id = clib_host_to_net_u32 (vrf_id);
clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);
@@ -1226,6 +1228,7 @@ nat_ipfix_logging_nat64_ses (u32 thread_index, u8 nat_event,
clib_memcpy_fast (b0->data + offset, &nat_dst_port, sizeof (nat_dst_port));
offset += sizeof (nat_dst_port);
+ vrf_id = clib_host_to_net_u32 (vrf_id);
clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);