diff options
author | Matus Fabian <matfabia@cisco.com> | 2017-12-19 03:43:07 -0800 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-01-03 11:44:40 +0000 |
commit | a3a6ec63d34c98e19b18530c165d09ac61389225 (patch) | |
tree | b8153ff25070020ec8c6fcef37f8a15b82d7b59a /src/plugins/nat/nat64_in2out.c | |
parent | 041fa507c085010d55d18088321faa64d345bb88 (diff) |
NAT64: free port when dynamic BIB deleted (VPP-1107)v18.04-rc0
Change-Id: Id897ed61a26a4069678ed4ddac1ba28bf32809c3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat64_in2out.c')
-rw-r--r-- | src/plugins/nat/nat64_in2out.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/nat/nat64_in2out.c b/src/plugins/nat/nat64_in2out.c index 7a0bf85d96c..ef322d5b60d 100644 --- a/src/plugins/nat/nat64_in2out.c +++ b/src/plugins/nat/nat64_in2out.c @@ -190,8 +190,7 @@ nat64_in2out_tcp_udp_set_cb (ip6_header_t * ip6, ip4_header_t * ip4, bibe = nat64_db_bib_entry_create (db, &ip6->src_address, &out_addr, - sport, clib_host_to_net_u16 (out_port), - fib_index, proto, 0); + sport, out_port, fib_index, proto, 0); if (!bibe) return -1; } @@ -279,8 +278,7 @@ nat64_in2out_icmp_set_cb (ip6_header_t * ip6, ip4_header_t * ip4, void *arg) bibe = nat64_db_bib_entry_create (db, &ip6->src_address, - &out_addr, in_id, - clib_host_to_net_u16 (out_id), + &out_addr, in_id, out_id, fib_index, IP_PROTOCOL_ICMP, 0); if (!bibe) return -1; @@ -604,8 +602,7 @@ nat64_in2out_tcp_udp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, bibe = nat64_db_bib_entry_create (db, &ip6->src_address, &out_addr, - sport, clib_host_to_net_u16 (out_port), - fib_index, proto, 0); + sport, out_port, fib_index, proto, 0); if (!bibe) return -1; } @@ -1435,8 +1432,7 @@ nat64_in2out_reass_node_fn (vlib_main_t * vm, nat64_db_bib_entry_create (db, &ip60->src_address, &out_addr0, udp0->src_port, - clib_host_to_net_u16 - (out_port0), fib_index0, + out_port0, fib_index0, l4_protocol0, 0); if (!bibe0) { |