From d2bad81b0ddaa7420b2f767e1a8dc078c0eadbcb Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Fri, 21 Dec 2018 04:01:00 -0800 Subject: NAT: fix coverity error 190176 (VPP-1474) Change-Id: I0ee80c7bec59d3e9c69e92e6cf0af1a6864a4ec4 Signed-off-by: Matus Fabian --- src/plugins/nat/nat.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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++) -- cgit 1.2.3-korg