summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/pnat/pnat.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2021-03-09 09:25:33 +0100
committerNeale Ranns <neale@graphiant.com>2021-03-09 10:11:57 +0000
commitd01caf7fa215d2cbea8cfab1d3d0b6d9d04a5661 (patch)
treebae44aa70d63fbae2c5e43c4cfc729d59c434765 /src/plugins/nat/pnat/pnat.c
parentb0c2ec5e7c84241e0f5beb5fdf8a60cf111d5ffb (diff)
pnat: coverity fixes
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ia1cfdbd39ed458cb3fffd29a8b6d6eff64644de8
Diffstat (limited to 'src/plugins/nat/pnat/pnat.c')
-rw-r--r--src/plugins/nat/pnat/pnat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/nat/pnat/pnat.c b/src/plugins/nat/pnat/pnat.c
index 335d2750ce7..a47521f1747 100644
--- a/src/plugins/nat/pnat/pnat.c
+++ b/src/plugins/nat/pnat/pnat.c
@@ -148,13 +148,15 @@ static int pnat_disable_interface(u32 sw_if_index,
return 0;
if (interface->enabled[attachment] && attachment == PNAT_IP4_INPUT) {
- ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 0);
+ if (ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 0) != 0)
+ return -1;
if (vnet_feature_enable_disable("ip4-unicast", "pnat-input",
sw_if_index, 0, 0, 0) != 0)
return -1;
}
if (interface->enabled[attachment] && attachment == PNAT_IP4_OUTPUT) {
- ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index, 0);
+ if (ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index, 0) != 0)
+ return -1;
if (vnet_feature_enable_disable("ip4-output", "pnat-output",
sw_if_index, 0, 0, 0) != 0)
return -1;