summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/test/test_nat.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-05-11 08:58:05 +0000
committerOle Trøan <otroan@employees.org>2020-05-13 11:36:42 +0000
commitbc752e432ff3e252f6e1a3f0372c9532f14909cd (patch)
tree5399347c1e469d21529a0bc20ffd2d0783434e40 /src/plugins/nat/test/test_nat.py
parent1d61c2194d21df2003ff07ff5feae4130de6277e (diff)
nat: perf improvement - replace branchy code
Use a lookup table instead. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ia8461099828bb8824bf016201f135e6b69c444d1
Diffstat (limited to 'src/plugins/nat/test/test_nat.py')
-rw-r--r--src/plugins/nat/test/test_nat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/nat/test/test_nat.py b/src/plugins/nat/test/test_nat.py
index 1cddc405f07..a8e2af763d0 100644
--- a/src/plugins/nat/test/test_nat.py
+++ b/src/plugins/nat/test/test_nat.py
@@ -38,7 +38,7 @@ class Event(Packet):
fields_desc = [ByteEnumField("event_type", None,
{1: "add", 2: "del", 3: "refresh"}),
ByteEnumField("protocol", None,
- {0: "udp", 1: "tcp", 2: "icmp"}),
+ {0: "other", 1: "udp", 2: "tcp", 3: "icmp"}),
ShortField("flags", 0),
IPField("in_addr", None),
IPField("out_addr", None),