Page MenuHomeFreeBSD

netinet: allow UDP tunnels to be removed
ClosedPublic

Authored by kp on Feb 15 2022, 12:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 5:01 AM
Unknown Object (File)
Thu, Oct 24, 5:01 AM
Unknown Object (File)
Thu, Oct 24, 5:01 AM
Unknown Object (File)
Thu, Oct 24, 4:42 AM
Unknown Object (File)
Thu, Oct 17, 11:40 PM
Unknown Object (File)
Oct 1 2024, 5:42 AM
Unknown Object (File)
Sep 30 2024, 12:40 AM
Unknown Object (File)
Sep 8 2024, 9:36 PM

Details

Summary

udp_set_kernel_tunneling() rejects new callbacks if one is already set.
Allow callbacks to be cleared. The use case for this is OpenVPN DCO,
where the socket is opened by userspace and then adopted by the kernel
to run the tunnel. If the DCO interface is removed but userspace does
not close the socket (something the kernel cannot prevent) the installed
callbacks could be called with an invalidated context.

Allow new functions to be set, but only if they're NULL (i.e. allow the
callback functions to be cleared).

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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