]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
keysock: do not use raw socket code
authorGleb Smirnoff <glebius@FreeBSD.org>
Thu, 11 Aug 2022 16:19:36 +0000 (09:19 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Thu, 11 Aug 2022 16:19:36 +0000 (09:19 -0700)
commitea7be1293b48385f27b97c5f112e4cad93cbd33b
tree63036ab204e6b748dc404fba172578252ffc920a
parent36b10ac2cd18a535cac20ccf51e3fc6c408671e8
keysock: do not use raw socket code

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.

Reviewed by: melifaro
Differential revision: https://reviews.freebsd.org/D36123
sys/netipsec/key.c
sys/netipsec/keysock.c
sys/netipsec/keysock.h