aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/snat/snat_ipfix_logging.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-02-02 01:43:00 -0800
committerMatus Fabian <matfabia@cisco.com>2017-02-03 01:09:45 -0800
commit09d96f4a611fa989bfbbfb7e683d668dbe73ac1a (patch)
treec3e99fad08357a2c1b9660de49cf01b2e7d20aee /src/plugins/snat/snat_ipfix_logging.c
parent85bb9172894870f0c6c72e1555a0decf4d37213f (diff)
SNAT: Port allocation per protocol
Ports are allocated per protocol (UDP, TCP, ICMP) 1:1 NAT with port is configured for specific protocol Change-Id: I37ae5eed3715b223d0620d4fdaed7a482bb7a834 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/snat/snat_ipfix_logging.c')
-rw-r--r--src/plugins/snat/snat_ipfix_logging.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/snat/snat_ipfix_logging.c b/src/plugins/snat/snat_ipfix_logging.c
index d72eb226..9f1abb7d 100644
--- a/src/plugins/snat/snat_ipfix_logging.c
+++ b/src/plugins/snat/snat_ipfix_logging.c
@@ -295,9 +295,7 @@ snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip,
if (!silm->enabled)
return;
- proto = (snat_proto == SNAT_PROTOCOL_UDP) ? IP_PROTOCOL_UDP : proto;
- proto = (snat_proto == SNAT_PROTOCOL_TCP) ? IP_PROTOCOL_TCP : proto;
- proto = (snat_proto == SNAT_PROTOCOL_ICMP) ? IP_PROTOCOL_ICMP : proto;
+ proto = snat_proto_to_ip_proto (snat_proto);
now = (u64) ((vlib_time_now (vm) - silm->vlib_time_0) * 1e3);
now += silm->milisecond_time_0;