summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_bd.c
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2021-08-10 12:22:14 -0500
committerMatthew Smith <mgsmith@netgate.com>2021-08-19 15:52:18 +0000
commitad51075029c59dc4100c1a416bed17870b9be1b7 (patch)
tree4e59261885d9089a1e0bc9fde43a0c7213e8ffcf /src/vnet/l2/l2_bd.c
parent1d342b9c8f515eabfb20fe8856ba311769870711 (diff)
nat: handle ED in2out ICMP errors with workers
Type: fix With endpoint dependent NAT44, When there are multiple workers we look for a flow which matches the packet in order to figure out which worker should handle the packet. If the packet is an ICMP error, it may be associated with an existing flow by inspecting the L3/L4 headers that are included in the message payload. This was not being done for in2out packets in nat44_ed_get_in2out_worker_index(), so some packets which were related to an open session were not being associated with that session and were being passed to a different thread than the one where the session was created. Later on, when the packet was processed by the fast path in2out node, the L3/L4 headers in the payload are inspected and the fast path node finds the existing session. Since that session is owned by a different thread than the one the packet is being processed by, the in2out fast path node can potentially access the wrong session and/or memory adjacent to the session pool. This can cause a SEGV. Make nat44_ed_get_in2out_worker_index() look at the inner headers when processing an ICMP error. THis is already done in nat44_ed_get_out2in_worker_index() and in the fast path in2out node. Change-Id: Icdc1abebcbce452ee7be7cb23fc563e09bf575f2 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet/l2/l2_bd.c')
0 files changed, 0 insertions, 0 deletions