summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/lib/ipfix_logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/lib/ipfix_logging.c')
-rw-r--r--src/plugins/nat/lib/ipfix_logging.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c
index 1c39e853084..50dbb2b327a 100644
--- a/src/plugins/nat/lib/ipfix_logging.c
+++ b/src/plugins/nat/lib/ipfix_logging.c
@@ -238,8 +238,8 @@ nat_template_rewrite (ipfix_exporter_t *exp, flow_report_t *fr,
ip->ip_version_and_header_length = 0x45;
ip->ttl = 254;
ip->protocol = IP_PROTOCOL_UDP;
- ip->src_address.as_u32 = exp->src_address.as_u32;
- ip->dst_address.as_u32 = exp->ipfix_collector.as_u32;
+ ip->src_address.as_u32 = exp->src_address.ip.ip4.as_u32;
+ ip->dst_address.as_u32 = exp->ipfix_collector.ip.ip4.as_u32;
udp->src_port = clib_host_to_net_u16 (stream->src_port);
udp->dst_port = clib_host_to_net_u16 (collector_port);
udp->length = clib_host_to_net_u16 (vec_len (rewrite) - sizeof (*ip));
@@ -490,8 +490,8 @@ nat_ipfix_header_create (flow_report_main_t * frm,
ip->ttl = 254;
ip->protocol = IP_PROTOCOL_UDP;
ip->flags_and_fragment_offset = 0;
- ip->src_address.as_u32 = exp->src_address.as_u32;
- ip->dst_address.as_u32 = exp->ipfix_collector.as_u32;
+ ip->src_address.as_u32 = exp->src_address.ip.ip4.as_u32;
+ ip->dst_address.as_u32 = exp->ipfix_collector.ip.ip4.as_u32;
udp->src_port = clib_host_to_net_u16 (stream->src_port);
udp->dst_port = clib_host_to_net_u16 (exp->collector_port);
udp->checksum = 0;