aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiklos Tirpak <miklos.tirpak@gmail.com>2021-07-01 17:26:34 +0200
committerDamjan Marion <dmarion@me.com>2021-07-13 17:19:51 +0000
commit32ac2d92daad05765fa3cabf332271579d6caefa (patch)
tree21b4ee4a6331d21f1ad90eb6a126ed5b095f0ca8 /src
parent8147559ff9ea9119b95718238713c8fbaa22e4ca (diff)
mss_clamp: coverity test fix
Silence the coverity test with setting the interface index in a variable before the boundary check. Type: fix Change-Id: I9bd6db08bfef93142581dada0b6a7d78b7de91e7 Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/mss_clamp/mss_clamp_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/mss_clamp/mss_clamp_api.c b/src/plugins/mss_clamp/mss_clamp_api.c
index 27804d6fb1a..c6557ea6db7 100644
--- a/src/plugins/mss_clamp/mss_clamp_api.c
+++ b/src/plugins/mss_clamp/mss_clamp_api.c
@@ -35,12 +35,15 @@ vl_api_mss_clamp_enable_disable_t_handler (
mssc_main_t *cm = &mssc_main;
vl_api_mss_clamp_enable_disable_reply_t *rmp;
int rv;
+ u32 sw_if_index;
+
+ sw_if_index = ntohl (mp->sw_if_index);
VALIDATE_SW_IF_INDEX (mp);
- rv = mssc_enable_disable (ntohl (mp->sw_if_index), mp->ipv4_direction,
- mp->ipv6_direction, ntohs (mp->ipv4_mss),
- ntohs (mp->ipv6_mss));
+ rv =
+ mssc_enable_disable (sw_if_index, mp->ipv4_direction, mp->ipv6_direction,
+ ntohs (mp->ipv4_mss), ntohs (mp->ipv6_mss));
BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_MSS_CLAMP_ENABLE_DISABLE_REPLY);