len[0] = vlib_buffer_length_in_chain (vm, b[0]);
len[1] = vlib_buffer_length_in_chain (vm, b[1]);
+ /* always search for P2P types in the DP */
if (is_ipv6)
{
gre_mk_key6 (&ip6[0]->dst_address,
&ip6[0]->src_address,
vnet_buffer (b[0])->ip.fib_index,
- type[0], 0, &key[0].gtk_v6);
+ type[0], TUNNEL_MODE_P2P, 0, &key[0].gtk_v6);
gre_mk_key6 (&ip6[1]->dst_address,
&ip6[1]->src_address,
vnet_buffer (b[1])->ip.fib_index,
- type[1], 0, &key[1].gtk_v6);
+ type[1], TUNNEL_MODE_P2P, 0, &key[1].gtk_v6);
matched[0] = gre_match_key6 (&cached_key.gtk_v6, &key[0].gtk_v6);
matched[1] = gre_match_key6 (&cached_key.gtk_v6, &key[1].gtk_v6);
}
gre_mk_key4 (ip4[0]->dst_address,
ip4[0]->src_address,
vnet_buffer (b[0])->ip.fib_index,
- type[0], 0, &key[0].gtk_v4);
+ type[0], TUNNEL_MODE_P2P, 0, &key[0].gtk_v4);
gre_mk_key4 (ip4[1]->dst_address,
ip4[1]->src_address,
vnet_buffer (b[1])->ip.fib_index,
- type[1], 0, &key[1].gtk_v4);
+ type[1], TUNNEL_MODE_P2P, 0, &key[1].gtk_v4);
matched[0] = gre_match_key4 (&cached_key.gtk_v4, &key[0].gtk_v4);
matched[1] = gre_match_key4 (&cached_key.gtk_v4, &key[1].gtk_v4);
}
vnet_buffer (b[1])->sw_if_index[VLIB_RX] = tun_sw_if_index[1];
}
+ vnet_buffer (b[0])->sw_if_index[VLIB_TX] = (u32) ~0;
+ vnet_buffer (b[1])->sw_if_index[VLIB_TX] = (u32) ~0;
+
if (PREDICT_FALSE (b[0]->flags & VLIB_BUFFER_IS_TRACED))
gre_trace (vm, node, b[0], tun_sw_if_index[0], ip6[0], ip4[0],
is_ipv6);
gre_mk_key6 (&ip6[0]->dst_address,
&ip6[0]->src_address,
vnet_buffer (b[0])->ip.fib_index,
- type[0], 0, &key[0].gtk_v6);
+ type[0], TUNNEL_MODE_P2P, 0, &key[0].gtk_v6);
matched[0] = gre_match_key6 (&cached_key.gtk_v6, &key[0].gtk_v6);
}
else
gre_mk_key4 (ip4[0]->dst_address,
ip4[0]->src_address,
vnet_buffer (b[0])->ip.fib_index,
- type[0], 0, &key[0].gtk_v4);
+ type[0], TUNNEL_MODE_P2P, 0, &key[0].gtk_v4);
matched[0] = gre_match_key4 (&cached_key.gtk_v4, &key[0].gtk_v4);
}
vnet_buffer (b[0])->sw_if_index[VLIB_RX] = tun_sw_if_index[0];
}
+ vnet_buffer (b[0])->sw_if_index[VLIB_TX] = (u32) ~0;
+
if (PREDICT_FALSE (b[0]->flags & VLIB_BUFFER_IS_TRACED))
gre_trace (vm, node, b[0], tun_sw_if_index[0], ip6[0], ip4[0],
is_ipv6);