summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-01-03 04:56:09 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-03 15:10:11 +0000
commit78c3ba4fcfb06b8656a24817e183492c6a4fb2b8 (patch)
treef958528e1723b524398fc8b0f9857ac7b0746da2 /src
parent71f8742a1f998948ab3fc9ae4560be1885be2950 (diff)
SNAT: fix out2in ICMP worker lookup
Change-Id: I113e7927739de876f07c3f17454ad7499a74c634 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/snat/out2in.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/snat/out2in.c b/src/plugins/snat/out2in.c
index f1f4159cdce..9e5a8af8743 100644
--- a/src/plugins/snat/out2in.c
+++ b/src/plugins/snat/out2in.c
@@ -872,6 +872,13 @@ snat_out2in_worker_handoff_fn (vlib_main_t * vm,
key0.port = udp0->dst_port;
key0.fib_index = rx_fib_index0;
+ if (PREDICT_FALSE(ip0->protocol == IP_PROTOCOL_ICMP))
+ {
+ icmp46_header_t * icmp0 = (icmp46_header_t *) udp0;
+ icmp_echo_header_t *echo0 = (icmp_echo_header_t *)(icmp0+1);
+ key0.port = echo0->identifier;
+ }
+
kv0.key = key0.as_u64;
/* Ever heard of of the "user" before? */