summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/pnat/pnat.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2021-05-06 13:39:55 +0200
committerOle Troan <ot@cisco.com>2021-05-06 13:47:20 +0200
commitec34fb77231c9f601520d6a2eaa5aab8c54253a6 (patch)
treef4afa9689ff86a10cfe34ca9a80fdc8afa3c1a88 /src/plugins/nat/pnat/pnat.c
parentf09d655101d2400df91d2a388168b925eea0dc01 (diff)
pnat: coverity errors
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ic38cfbdcab86172bad6ec6cb4c66c83f8deed64f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/plugins/nat/pnat/pnat.c')
-rw-r--r--src/plugins/nat/pnat/pnat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/nat/pnat/pnat.c b/src/plugins/nat/pnat/pnat.c
index 7f02ec4b2f8..547b063f286 100644
--- a/src/plugins/nat/pnat/pnat.c
+++ b/src/plugins/nat/pnat/pnat.c
@@ -110,9 +110,15 @@ static clib_error_t *pnat_enable_interface(u32 sw_if_index,
if (input) {
/* TODO: Make shallow virtual reassembly configurable */
- ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 1);
+ if (ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 1) != 0)
+ return clib_error_return(0, "PNAT SVR enable failed on %u",
+ sw_if_index);
+
} else {
- ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index, 1);
+ if (ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index,
+ 1) != 0)
+ return clib_error_return(0, "PNAT SVR enable failed on %u",
+ sw_if_index);
}
interface->lookup_mask[attachment] = mask;