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)
Wed, Dec 4, 2:36 PM
Unknown Object (File)
Tue, Nov 19, 9:09 PM
Unknown Object (File)
Tue, Nov 19, 1:58 AM
Unknown Object (File)
Mon, Nov 18, 11:50 PM
Unknown Object (File)
Nov 2 2024, 6:53 AM
Unknown Object (File)
Nov 1 2024, 5:29 PM
Unknown Object (File)
Oct 1 2024, 7:23 AM
Unknown Object (File)
Sep 30 2024, 1:41 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
rS FreeBSD src repository - subversion
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsys/netipsec/keysock.c:91SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 46840
Build 43729: arc lint + arc unit

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.