- if (t0->flags & TUNNEL_ENCAP_DECAP_FLAG_DECAP_COPY_ECN)
- {
- if (is_ipv6)
- ip4_header_set_ecn_w_chksum ((ip4_header_t *) (ip60 + 1),
- ip6_ecn_network_order
- (ip60));
- else
- ip4_header_set_ecn_w_chksum (ip40 + 1,
- ip4_header_get_ecn (ip40));
- }
+
+ if (is_ipv6)
+ tunnel_decap_fixup_4o6 (t0->flags,
+ (ip4_header_t *) (ip60 + 1), ip60);
+ else
+ tunnel_decap_fixup_4o4 (t0->flags, ip40 + 1, ip40);
+ }
+ else if (inner_protocol0 == IP_PROTOCOL_MPLS_IN_IP)
+ {
+ next0 = IPIP_INPUT_NEXT_MPLS_INPUT;
+
+ if (is_ipv6)
+ tunnel_decap_fixup_mplso6 (
+ t0->flags, (mpls_unicast_header_t *) (ip60 + 1), ip60);
+ else
+ tunnel_decap_fixup_mplso4 (
+ t0->flags, (mpls_unicast_header_t *) ip40 + 1, ip40);