map: fix MAP-T ip6 port check 00/23800/2
authorMatthew Smith <mgsmith@netgate.com>
Wed, 4 Dec 2019 21:02:46 +0000 (15:02 -0600)
committerMatthew Smith <mgsmith@netgate.com>
Thu, 5 Dec 2019 16:24:41 +0000 (10:24 -0600)
commit9f3569615eaadcf24a880d8d5547df9ad7a1d35f
tree600e092bcbdea0338f1f26336c1904a5ae1bd2c0
parent1063f2ae80666d355407d58e0fda35fbd5292d9b
map: fix MAP-T ip6 port check

Type: fix
Ticket: VPP-1804

Fix a regression introduced by 640edcd90.

The port set ID on received IPv6 packets for MAP-T was being
checked against the destination port. It should be checked
against the source port.

Added a new unit test to verify that a v6 packet with a good
source port is translated and forwarded and a v6 packet with
a bad source port is dropped. The important part of the test
which will prevent similar future regressions is that the
source port and destination port are not equal. The existing
unit test used the same source and destination port which is
why it did not fail when the regression was introduced.

Change-Id: Idc144ea509722bb9e0f80b3887d220384a04e6d6
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/plugins/map/ip6_map_t.c
src/plugins/map/test/test_map.py