aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-04-02 13:13:39 +0000
committerNeale Ranns <nranns@cisco.com>2020-05-15 11:41:14 +0000
commit4362baa33c00b93d07f6648c87c064c96900f4df (patch)
treef7ffb67f3b6a98348ae4f88ae8d06f8d0ecbeffd /src/vlib
parent17b5c3d6ab83a597e7c79613041f2fd7470825bd (diff)
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 <ftehlar@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/punt.c11
1 files changed, 6 insertions, 5 deletions
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. */