Page MenuHomeFreeBSD

Remove xform_ipip.c and code related to XF_IP4
ClosedPublic

Authored by ae on Apr 16 2015, 5:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 4:31 PM
Unknown Object (File)
Sep 17 2024, 7:30 PM
Unknown Object (File)
Sep 14 2024, 8:33 PM
Unknown Object (File)
Aug 11 2024, 8:40 AM
Unknown Object (File)
Aug 10 2024, 3:35 PM
Unknown Object (File)
Jul 31 2024, 8:01 PM
Unknown Object (File)
Jul 27 2024, 4:33 AM
Unknown Object (File)
May 23 2024, 11:28 AM
Subscribers

Details

Summary

The only thing is used from this code is ipip_output() function, that does IPIP encapsulation. Other parts of XF_IP4 code were removed in r275133.
Also it isn't possible to configure the use of XF_IP4, nor from userland via setkey(8), nor from the kernel.
Simplify the ipip_output() function and rename it to ipsec_encap().

  • move IP_DF handling from ipsec4_process_packet() into ipsec_encap();
  • since ipsec_encap() called from ipsec[64]_process_packet(), it is safe to assume that mbuf is contiguous at least to IP header for used IP version. Remove all unneeded m_pullup(), m_copydata and related checks;
  • use V_ip_defttl and V_ip6_defhlim for outer headers;
  • move all diagnostic messages to the ipsec_encap() callers;
  • simplify handling of ipsec_encap() return result: if it returns non zero value, print diagnostic message and free mbuf.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ae retitled this revision from to Remove xform_ipip.c and code related to XF_IP4.
ae updated this object.
ae edited the test plan for this revision. (Show Details)
ae added reviewers: network, vanhu.
This revision is now accepted and ready to land.Apr 17 2015, 1:02 PM
ae updated this revision to Diff 4897.

Closed by commit rS281692 (authored by @ae).