summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-11-20 02:19:05 -0800
committerDamjan Marion <dmarion@me.com>2018-11-20 11:29:29 +0000
commit111add7e5d6581bb4eca05cc862a651ff6a09792 (patch)
treeceacf2bc84e338eb919b400101112512c7f730a7 /src/plugins/nat
parent9162c2d2e2450b7d497ff4be002cf619009f3f9e (diff)
NAT44: fix virtual fragmentation reassembly in forwarding mode (VPP-1501)
Change-Id: Id86d8aa8753b9b2ff4c709b11e3901ba8d552918 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat')
-rwxr-xr-xsrc/plugins/nat/out2in.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index 9cace08c565..52f2023efe1 100755
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -1443,6 +1443,12 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm,
node->errors[SNAT_OUT2IN_ERROR_NO_TRANSLATION];
next0 = SNAT_OUT2IN_NEXT_DROP;
}
+ else
+ {
+ reass0->flags |= NAT_REASS_FLAG_ED_DONT_TRANSLATE;
+ nat_ip4_reass_get_frags (reass0,
+ &fragments_to_loopback);
+ }
goto trace0;
}
@@ -1474,6 +1480,8 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm,
}
else
{
+ if (reass0->flags & NAT_REASS_FLAG_ED_DONT_TRANSLATE)
+ goto trace0;
if (PREDICT_FALSE (reass0->sess_index == (u32) ~ 0))
{
if (nat_ip4_reass_add_fragment
href='#n188'>188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251