diff options
author | Klement Sekera <ksekera@cisco.com> | 2021-03-05 20:34:05 +0100 |
---|---|---|
committer | Klement Sekera <ksekera@cisco.com> | 2021-03-07 23:39:25 +0000 |
commit | e3416e307e263dc565546c4e748df99b584708a0 (patch) | |
tree | b80f0f327fee5c9f946ab4f19b5d825e2828b7cc /src/plugins/nat/nat44-ed/nat44_ed_out2in.c | |
parent | 76401c5767ecdf701f4c77beee0b721c485321d5 (diff) |
nat: replace main vlib with per-thread vlib
Fix incorrect vlib main usage.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ic5304ca844f1b27756818eb6995b1d9c08412674
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed_out2in.c')
-rw-r--r-- | src/plugins/nat/nat44-ed/nat44_ed_out2in.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c index d3fd50953e0..2f83ad3f3e7 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c +++ b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c @@ -149,7 +149,7 @@ icmp_out2in_ed_slow_path (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, } if (snat_static_mapping_match ( - sm, ip->dst_address, lookup_sport, rx_fib_index, + vm, sm, ip->dst_address, lookup_sport, rx_fib_index, ip_proto_to_nat_proto (ip->protocol), &sm_addr, &sm_port, &sm_fib_index, 1, &is_addr_only, 0, 0, 0, &identity_nat, &m)) { @@ -1198,11 +1198,11 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm, /* Try to match static mapping by external address and port, destination address and port in packet */ - if (snat_static_mapping_match - (sm, ip0->dst_address, - vnet_buffer (b0)->ip.reass.l4_dst_port, rx_fib_index0, - proto0, &sm_addr, &sm_port, &sm_fib_index, 1, 0, - &twice_nat0, &lb_nat0, &ip0->src_address, &identity_nat0, &m)) + if (snat_static_mapping_match ( + vm, sm, ip0->dst_address, + vnet_buffer (b0)->ip.reass.l4_dst_port, rx_fib_index0, proto0, + &sm_addr, &sm_port, &sm_fib_index, 1, 0, &twice_nat0, &lb_nat0, + &ip0->src_address, &identity_nat0, &m)) { /* * Send DHCP packets to the ipv4 stack, or we won't |