Does sosend() need CURVNET_SET/CURVNET_RESTORE?

Kristof Provost kp at FreeBSD.org
Mon Feb 3 05:32:22 UTC 2020


On 2 Feb 2020, at 13:22, Rick Macklem wrote:
> The current krpc code calls sosend() and soreceive() without any
> CURVNET_SET()/CURVNET_RESTORE() wrapped around them.
>
sosend() and soreceive() do the CURVENT_SET()/CURVNET_RESTORE() dance 
for you.

> When I recently used sosend_generic(), it panic'd without them.
>
sosend_generic() does not, because usually sosend() calls it, so it’d 
already be set.

Best regards,
Kristof


More information about the freebsd-net mailing list