next0 = vec_elt(rt->next_by_protocol, i0);
next1 = vec_elt(rt->next_by_protocol, i1);
- b0->error = node->errors[next0 == SPARSE_VEC_INVALID_INDEX ? GRE_ERROR_UNKNOWN_PROTOCOL : GRE_ERROR_NONE];
- b1->error = node->errors[next1 == SPARSE_VEC_INVALID_INDEX ? GRE_ERROR_UNKNOWN_PROTOCOL : GRE_ERROR_NONE];
+ b0->error = node->errors[i0 == SPARSE_VEC_INVALID_INDEX ? GRE_ERROR_UNKNOWN_PROTOCOL : GRE_ERROR_NONE];
+ b1->error = node->errors[i1 == SPARSE_VEC_INVALID_INDEX ? GRE_ERROR_UNKNOWN_PROTOCOL : GRE_ERROR_NONE];
version0 = clib_net_to_host_u16 (h0->flags_and_version);
verr0 = version0 & GRE_VERSION_MASK;
next0 = vec_elt(rt->next_by_protocol, i0);
b0->error =
- node->errors[next0 == SPARSE_VEC_INVALID_INDEX
+ node->errors[i0 == SPARSE_VEC_INVALID_INDEX
? GRE_ERROR_UNKNOWN_PROTOCOL : GRE_ERROR_NONE];
version0 = clib_net_to_host_u16 (h0->flags_and_version);
next0 = (error0 == 0) ? vec_elt(rt->next_by_dst_port, i0) : next0;
next1 = (error1 == 0) ? vec_elt(rt->next_by_dst_port, i1) : next1;
- if (PREDICT_FALSE(next0 == SPARSE_VEC_INVALID_INDEX))
+ if (PREDICT_FALSE(i0 == SPARSE_VEC_INVALID_INDEX))
{
// move the pointer back so icmp-error can find the
// ip packet header
vlib_buffer_advance (b0, sizeof (*h0));
}
- if (PREDICT_FALSE(next1 == SPARSE_VEC_INVALID_INDEX))
+ if (PREDICT_FALSE(i1 == SPARSE_VEC_INVALID_INDEX))
{
// move the pointer back so icmp-error can find the
// ip packet header
i0 = sparse_vec_index (rt->next_by_dst_port, h0->dst_port);
next0 = vec_elt(rt->next_by_dst_port, i0);
- if (PREDICT_FALSE(next0 == SPARSE_VEC_INVALID_INDEX))
+ if (PREDICT_FALSE(i0 == SPARSE_VEC_INVALID_INDEX))
{
// move the pointer back so icmp-error can find the
// ip packet header