diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2020-09-21 19:14:08 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-09-25 19:55:39 +0000 |
commit | af897c5e3fa76180fbe0634052bde98b4b3c34d7 (patch) | |
tree | 8078e55c02f69ac6b21eaf62fe4f653f71320871 /src/plugins/cnat/cnat_client.c | |
parent | ce25b60de5536e2f79bb72e929e70ccc1a75e0f8 (diff) |
cnat: Add DHCP support
Type: feature
Change-Id: I4bd50fd672ac35cf14ebda2b0b10ec0b9a208628
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_client.c')
-rw-r--r-- | src/plugins/cnat/cnat_client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat_client.c b/src/plugins/cnat/cnat_client.c index 314000d785e..1074fccc97f 100644 --- a/src/plugins/cnat/cnat_client.c +++ b/src/plugins/cnat/cnat_client.c @@ -48,7 +48,6 @@ cnat_client_destroy (cnat_client_t * cc) { ASSERT (fib_entry_is_sourced (cc->cc_fei, cnat_fib_source)); fib_table_entry_delete_index (cc->cc_fei, cnat_fib_source); - ASSERT (!fib_entry_is_sourced (cc->cc_fei, cnat_fib_source)); } cnat_client_db_remove (cc); dpo_reset (&cc->cc_parent); @@ -110,6 +109,9 @@ void cnat_client_translation_added (index_t cci) { cnat_client_t *cc; + if (INDEX_INVALID == cci) + return; + cc = cnat_client_get (cci); ASSERT (!(cc->flags & CNAT_FLAG_EXPIRES)); cc->tr_refcnt++; @@ -119,6 +121,8 @@ void cnat_client_translation_deleted (index_t cci) { cnat_client_t *cc; + if (INDEX_INVALID == cci) + return; cc = cnat_client_get (cci); ASSERT (!(cc->flags & CNAT_FLAG_EXPIRES)); |