Currently we have two implementation of IP-in-IP encapsulation:
gif(4) and one in the netipsec/ - xform_ipip.
gif(4) is explicitly used by user. xform_ipip used by the
IPSEC code with tunnel mode. Now we redesigned the IPSEC code,
and IPIP encapsulation is called directly from ipsec_output,
IPIP decapsulation is done in the ipsec_input with m_striphdr.
Previously IPIP decapsulation was done from ip_input via ip_encap.
This method had several issues when packets were encapsulated several
times (e.g. one with IPSEC code, other with gif(4)).
Currently xform_ipip used as fallback with low priority for IPIP
encapsulated packets that were decrypted. And in some cases
xform_ipip can decapsulate packets, that it shouldn't decapsulate.
This leads to situations, when wrong configurations are magically working.
Also it can propagate wrong ingress interface and this can break security.