Page MenuHomeFreeBSD

keysock: do not use raw socket code
ClosedPublic

Authored by glebius on Aug 10 2022, 10:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 6:53 AM
Unknown Object (File)
Fri, Nov 1, 5:29 PM
Unknown Object (File)
Oct 1 2024, 7:23 AM
Unknown Object (File)
Sep 30 2024, 1:41 PM
Unknown Object (File)
Sep 30 2024, 1:32 PM
Unknown Object (File)
Sep 30 2024, 1:31 PM
Unknown Object (File)
Sep 27 2024, 5:44 PM
Unknown Object (File)
Sep 27 2024, 5:05 PM
Subscribers

Details

Summary

This makes key socket implementation self contained and removes one
of the last dependencies on the raw socket code and pr_output method.

There are very subtle API visible changes:

  • now key socket would return EOPNOTSUPP instead of EINVAL on syscalls that are not supposed to be called on a key socket.
  • key socket buffer sizes are now controlled by net.key sysctls instead of net.raw. The latter were not documented anywhere, and even Internet search doesn't find any references or discussions related to them.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM.
Could you please share output of netipsec/ tests in the testing section?

This revision is now accepted and ready to land.Aug 11 2022, 8:30 AM

LGTM.
Could you please share output of netipsec/ tests in the testing section?

We don't have much there, unfortunately. The netipsec/tunnel tests all pass. Also, I have compiled sbin/setkey/test-pfkey.c and checked that it operates equally before and after the patch. Note: it was not able to process all of its tests before patch as well.

This revision was landed with ongoing or failed builds.Aug 11 2022, 4:20 PM
This revision was automatically updated to reflect the committed changes.