diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/ip/icmp4.c | 7 | ||||
-rw-r--r-- | vnet/vnet/ip/ip4_forward.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/vnet/vnet/ip/icmp4.c b/vnet/vnet/ip/icmp4.c index abad5bd9efc..a02b52950a3 100644 --- a/vnet/vnet/ip/icmp4.c +++ b/vnet/vnet/ip/icmp4.c @@ -510,8 +510,11 @@ ip4_icmp_error (vlib_main_t * vm, out_ip0->ttl = 0xff; out_ip0->protocol = IP_PROTOCOL_ICMP; out_ip0->dst_address = ip0->src_address; - if_add_index0 = - lm->if_address_pool_index_by_sw_if_index[sw_if_index0]; + if_add_index0 = ~0; + if (PREDICT_TRUE (vec_len (lm->if_address_pool_index_by_sw_if_index) + > sw_if_index0)) + if_add_index0 = + lm->if_address_pool_index_by_sw_if_index[sw_if_index0]; if (PREDICT_TRUE(if_add_index0 != ~0)) { ip_interface_address_t *if_add = pool_elt_at_index(lm->if_address_pool, if_add_index0); diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c index f7cc7667069..8914abecc72 100644 --- a/vnet/vnet/ip/ip4_forward.c +++ b/vnet/vnet/ip/ip4_forward.c @@ -1506,6 +1506,7 @@ ip4_local (vlib_main_t * vm, && dpo0->dpoi_type != DPO_ADJACENCY && dpo0->dpoi_type != DPO_ADJACENCY_INCOMPLETE && dpo0->dpoi_type != DPO_RECEIVE + && dpo0->dpoi_type != DPO_DROP && dpo0->dpoi_type != DPO_ADJACENCY_GLEAN && ip0->dst_address.as_u32 != 0xFFFFFFFF ? IP4_ERROR_SRC_LOOKUP_MISS @@ -1516,8 +1517,9 @@ ip4_local (vlib_main_t * vm, error1 = (error1 == IP4_ERROR_UNKNOWN_PROTOCOL && dpo1->dpoi_type != DPO_ADJACENCY && dpo1->dpoi_type != DPO_ADJACENCY_INCOMPLETE - && dpo0->dpoi_type != DPO_RECEIVE - && dpo0->dpoi_type != DPO_ADJACENCY_GLEAN + && dpo1->dpoi_type != DPO_RECEIVE + && dpo1->dpoi_type != DPO_DROP + && dpo1->dpoi_type != DPO_ADJACENCY_GLEAN && ip1->dst_address.as_u32 != 0xFFFFFFFF ? IP4_ERROR_SRC_LOOKUP_MISS : error1); @@ -1673,6 +1675,7 @@ ip4_local (vlib_main_t * vm, && dpo0->dpoi_type != DPO_ADJACENCY && dpo0->dpoi_type != DPO_ADJACENCY_INCOMPLETE && dpo0->dpoi_type != DPO_RECEIVE + && dpo0->dpoi_type != DPO_DROP && dpo0->dpoi_type != DPO_ADJACENCY_GLEAN && ip0->dst_address.as_u32 != 0xFFFFFFFF ? IP4_ERROR_SRC_LOOKUP_MISS |