- is_ip4_0 = (t0->flags & VXLAN_GPE_TUNNEL_IS_IPV4);
- is_ip4_1 = (t1->flags & VXLAN_GPE_TUNNEL_IS_IPV4);
+ /* get the flag "is_ip4" */
+ if (sw_if_index1 != vnet_buffer (b1)->sw_if_index[VLIB_TX])
+ {
+ if (sw_if_index0 == vnet_buffer (b1)->sw_if_index[VLIB_TX])
+ {
+ sw_if_index1 = sw_if_index0;
+ hi1 = hi0;
+ t1 = t0;
+ is_ip4_1 = is_ip4_0;
+ }
+ else
+ {
+ sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_TX];
+ hi1 =
+ vnet_get_sup_hw_interface (vnm,
+ vnet_buffer (b1)->sw_if_index
+ [VLIB_TX]);
+ t1 = pool_elt_at_index (ngm->tunnels, hi1->dev_instance);
+ is_ip4_1 = (t1->flags & VXLAN_GPE_TUNNEL_IS_IPV4);
+ }
+ }