summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_node_feature.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-02-26 18:12:20 +0100
committerDave Barach <openvpp@barachs.net>2021-03-04 12:35:15 +0000
commit8786a4cd4a62f2817da7060afd8523857f504912 (patch)
treee191304d55a70370bae6a869cbfb7de0c7f7a0cd /src/plugins/cnat/cnat_node_feature.c
parent30ad571cc35e4dc6d4d7e50b81b97f83f8770eea (diff)
cnat: Fix snat with dhcp
Type: fix We didn't check that the srcEndpoint was resolved when creating the session, we could end up sNATing with 0.0.0.0 as src_addr Change-Id: If8dfa577e659cfe90b148657a44c0390a7d383e9 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_node_feature.c')
-rw-r--r--src/plugins/cnat/cnat_node_feature.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cnat/cnat_node_feature.c b/src/plugins/cnat/cnat_node_feature.c
index 10293de5069..c99160cb33e 100644
--- a/src/plugins/cnat/cnat_node_feature.c
+++ b/src/plugins/cnat/cnat_node_feature.c
@@ -72,6 +72,7 @@ cnat_input_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node,
cc = cnat_client_ip6_find (&ip6->dst_address); /* TODO: same as above */
}
+ /* Wrong session key */
if (session->key.cs_proto == 0)
goto trace;
@@ -265,6 +266,7 @@ cnat_output_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node,
udp0 = (udp_header_t *) (ip6 + 1);
}
+ /* Wrong session key */
if (session->key.cs_proto == 0)
goto trace;