From 76401c5767ecdf701f4c77beee0b721c485321d5 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 3 Mar 2021 22:14:55 +0100 Subject: nat: fix worker selection Use correct ports from SVR. Perform lookup of existing session for all cases to pick any created bypasses and derive correct thread indexes. Type: fix Change-Id: I1e3814c9e13cd4d9b8d65f514f7e9ab42df3c22e Signed-off-by: Klement Sekera --- src/plugins/nat/nat44-ei/nat44_ei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/nat/nat44-ei') diff --git a/src/plugins/nat/nat44-ei/nat44_ei.c b/src/plugins/nat/nat44-ei/nat44_ei.c index d361060a42e..67757015b1d 100644 --- a/src/plugins/nat/nat44-ei/nat44_ei.c +++ b/src/plugins/nat/nat44-ei/nat44_ei.c @@ -1407,7 +1407,7 @@ nat44_ei_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip0, proto = ip_proto_to_nat_proto (ip0->protocol); udp = ip4_next_header (ip0); - port = udp->dst_port; + port = vnet_buffer (b)->ip.reass.l4_dst_port; /* unknown protocol */ if (PREDICT_FALSE (proto == NAT_PROTOCOL_OTHER)) -- cgit 1.2.3-korg