nat: fix port number selection 86/27786/3
authorElias Rudberg <elias.rudberg@bahnhof.net>
Thu, 2 Jul 2020 19:21:34 +0000 (21:21 +0200)
committerOle Trøan <otroan@employees.org>
Thu, 23 Jul 2020 12:50:57 +0000 (12:50 +0000)
commitbf9a0c8097d47f052efea13a09d3a6c6fc68fb35
tree968884118160c9fa831d7f501d861f9c8350fa56
parent7c8644c368e19d8d34059ffa13e208f1534e23be
nat: fix port number selection

Change the port number selection for new NAT sessions so that it
matches how the thread index is calculated from the port number for
out2in packets. Before this change there was a problem when the
largest port number in the range was used, that resulted in the wrong
thread index being selected when out2in packets arrive for that
session.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I936c389eb0d5df6168e18e5e44754de1cdad6ad1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
src/plugins/nat/in2out_ed.c
src/plugins/nat/nat.c