IPv4 only ATM, want to get some feedback before handling IPv6.
Only map mbuf when a policy is looked up and indicates that IPSEC needs to transform the packet.
If IPSEC is inline offloaded, it is up to the interface driver to request remap if needed.
Fetch the IP header using m_copydata() instead of using mtod() to select policy/SA.
Change interface of mb_unmapped_to_ext() to distinguish failures between OOM and incompatible packets. Note that right now, TLS packets passed to IPSEC mean insta-panic for debug kernels, and UB for non-debug. This should be fixed by the patch.
Ideas for better diagnostic/action on EINVAL from mb_unmapped_to_ext() are solicited.