summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-07-11 07:01:25 -0400
committerDamjan Marion <dmarion@me.com>2018-07-11 13:16:45 +0000
commitf46d8f8d3fa1e0cefbc4c70645f2121b14662d4f (patch)
tree73cbcbf4aff0798b84c58c018048c76fa397fa24 /src/plugins
parent9aca7b5ee915b8035fb5b690b7520ab155fcb36e (diff)
VPP-1338: fix coverity warning in mactime plugin
Add missing VALIDATE_SW_IF_INDEX macro / check. Net of this fix, a spurious warning will probably recur. Coverity will complain that sw_if_index is tainted. Please dismiss the warning. Change-Id: Iec31ce1d86f742e197e63b0c5d474cd5e496ee5f Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/mactime/mactime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c
index 06dda537a2f..c5c6b8b9f2c 100644
--- a/src/plugins/mactime/mactime.c
+++ b/src/plugins/mactime/mactime.c
@@ -177,9 +177,11 @@ static void vl_api_mactime_enable_disable_t_handler
mactime_main_t *mm = &mactime_main;
int rv;
+ VALIDATE_SW_IF_INDEX (mp);
+
rv = mactime_enable_disable (mm, ntohl (mp->sw_if_index),
(int) (mp->enable_disable));
-
+ BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_MACTIME_ENABLE_DISABLE_REPLY);
}