From 4362baa33c00b93d07f6648c87c064c96900f4df Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Thu, 2 Apr 2020 13:13:39 +0000 Subject: ikev2: add support for NAT traversal Type: feature * initiator behind NAT supported * tested with static NAT mappings * works only with pre-configured tunnels The pre-configured tunnel has to be defined as follows: initiator (i) side: src=ip(i) dst=ip(r) responder (r) side: src=ip(r) dst=ip(nat) Change-Id: Ia9f79ddbbcc3f7dc8fde6bbeca2a433e3b784e94 Signed-off-by: Filip Tehlar --- src/vlib/punt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/vlib/punt.c') diff --git a/src/vlib/punt.c b/src/vlib/punt.c index d5e13004caf..04e3b5a3956 100644 --- a/src/vlib/punt.c +++ b/src/vlib/punt.c @@ -17,8 +17,9 @@ /** * The last allocated punt reason + * Value 0 is reserved for invalid index. */ -static vlib_punt_reason_t punt_reason_last; +static vlib_punt_reason_t punt_reason_last = 1; /** * Counters per punt-reason @@ -434,10 +435,10 @@ punt_reason_walk (punt_reason_walk_cb_t cb, void *ctx) { punt_reason_data_t *pd; - vec_foreach (pd, punt_reason_data) - { - cb (pd->pd_reason, pd->pd_name, ctx); - } + for (pd = punt_reason_data + 1; pd < vec_end (punt_reason_data); pd++) + { + cb (pd->pd_reason, pd->pd_name, ctx); + } } /* Parse node name -> node index. */ -- cgit 1.2.3-korg