summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-12-21 04:01:00 -0800
committerMatus Fabian <matfabia@cisco.com>2018-12-21 04:01:00 -0800
commitd2bad81b0ddaa7420b2f767e1a8dc078c0eadbcb (patch)
treea8cca26a5b0ab63a6a2fb72ecfb3b819f5881288 /src/plugins
parent087c811b63aa6b0575149749e188bb37e7fb0513 (diff)
NAT: fix coverity error 190176 (VPP-1474)
Change-Id: I0ee80c7bec59d3e9c69e92e6cf0af1a6864a4ec4 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins')
-rwxr-xr-xsrc/plugins/nat/nat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index c2c812d114b..0cfcbf16ceb 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -1575,6 +1575,8 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
}));
/* *INDENT-ON* */
+ ASSERT (vec_len (locals) > 1);
+
local = pool_elt_at_index (m->locals, locals[0]);
local->prefix = local->probability;
for (i = 1; i < vec_len (locals); i++)