X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fipsec_tun.c;h=268f7783ebf363dba0994d1236d107d6c2853e64;hb=dc3e9664858df680accca7324299b633bf60397d;hp=07dd9ea409bf22abe1bdc3d495db38a46cd0ae07;hpb=4fde4ae0363de45d867eb3472e43b89ae34d3bd1;p=vpp.git diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index 07dd9ea409b..268f7783ebf 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -626,6 +626,12 @@ ipsec_tun_protect_update (u32 sw_if_index, format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_ip_address, nh); + if (vec_len (sas_in) > ITP_MAX_N_SA_IN) + { + rv = VNET_API_ERROR_LIMIT_EXCEEDED; + goto out; + } + rv = 0; im = &ipsec_main; if (NULL == nh)