- vxlan_tunnel_t *t0, *stats_t0;
- vxlan_tunnel_t *t1, *stats_t1;
- if (is_ip4)
- {
- t0 =
- vxlan4_find_tunnel (vxm, &last4, fi0, ip4_0, vxlan0, &stats_t0);
- t1 =
- vxlan4_find_tunnel (vxm, &last4, fi1, ip4_1, vxlan1, &stats_t1);
- }
- else
- {
- t0 =
- vxlan6_find_tunnel (vxm, &last6, fi0, ip6_0, vxlan0, &stats_t0);
- t1 =
- vxlan6_find_tunnel (vxm, &last6, fi1, ip6_1, vxlan1, &stats_t1);
- }
-
- error0 = t0 == 0 ? VXLAN_ERROR_NO_SUCH_TUNNEL : error0;
- error1 = t1 == 0 ? VXLAN_ERROR_NO_SUCH_TUNNEL : error1;
+ vxlan_decap_info_t di0 = is_ip4 ?
+ vxlan4_find_tunnel (vxm, &last4, fi0, ip4_0, vxlan0, &stats_if0) :
+ vxlan6_find_tunnel (vxm, &last6, fi0, ip6_0, vxlan0, &stats_if0);
+ vxlan_decap_info_t di1 = is_ip4 ?
+ vxlan4_find_tunnel (vxm, &last4, fi1, ip4_1, vxlan1, &stats_if1) :
+ vxlan6_find_tunnel (vxm, &last6, fi1, ip6_1, vxlan1, &stats_if1);