aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/dslite_in2out.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-12-08 03:38:51 -0800
committerOle Trøan <otroan@employees.org>2017-12-13 14:13:14 +0000
commit331acc632477ed2da1c9c0b90915a227b5e343d5 (patch)
tree2a27d80903f3fc01bdf71cc5f984bac6486fcfba /src/plugins/nat/dslite_in2out.c
parent51e5edcbdd1eaea8f8f5566d35d6d865a6832594 (diff)
NAT: DS-Lite AFTR tunnel endpoint address respond to ICMPv6 echo request (VPP-1090)
Change-Id: I361c043979274eac1aefcd95abdf1624a3ef2756 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/dslite_in2out.c')
-rw-r--r--src/plugins/nat/dslite_in2out.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/nat/dslite_in2out.c b/src/plugins/nat/dslite_in2out.c
index 9a7751ce11c..54568914ce0 100644
--- a/src/plugins/nat/dslite_in2out.c
+++ b/src/plugins/nat/dslite_in2out.c
@@ -20,7 +20,7 @@ vlib_node_registration_t dslite_in2out_slowpath_node;
typedef enum
{
DSLITE_IN2OUT_NEXT_IP4_LOOKUP,
- DSLITE_IN2OUT_NEXT_IP6_LOOKUP,
+ DSLITE_IN2OUT_NEXT_IP6_ICMP,
DSLITE_IN2OUT_NEXT_DROP,
DSLITE_IN2OUT_NEXT_SLOWPATH,
DSLITE_IN2OUT_N_NEXT,
@@ -278,6 +278,11 @@ dslite_in2out_node_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (PREDICT_FALSE (ip60->protocol != IP_PROTOCOL_IP_IN_IP))
{
+ if (ip60->protocol == IP_PROTOCOL_ICMP6)
+ {
+ next0 = DSLITE_IN2OUT_NEXT_IP6_ICMP;
+ goto trace0;
+ }
error0 = DSLITE_ERROR_BAD_IP6_PROTOCOL;
next0 = DSLITE_IN2OUT_NEXT_DROP;
goto trace0;
@@ -443,7 +448,7 @@ VLIB_REGISTER_NODE (dslite_in2out_node) = {
.next_nodes = {
[DSLITE_IN2OUT_NEXT_DROP] = "error-drop",
[DSLITE_IN2OUT_NEXT_IP4_LOOKUP] = "ip4-lookup",
- [DSLITE_IN2OUT_NEXT_IP6_LOOKUP] = "ip6-lookup",
+ [DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-icmp-input",
[DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath",
},
};
@@ -472,7 +477,7 @@ VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) = {
.next_nodes = {
[DSLITE_IN2OUT_NEXT_DROP] = "error-drop",
[DSLITE_IN2OUT_NEXT_IP4_LOOKUP] = "ip4-lookup",
- [DSLITE_IN2OUT_NEXT_IP6_LOOKUP] = "ip6-lookup",
+ [DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-lookup",
[DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath",
},
};