Page MenuHomeFreeBSD

netinet: allow UDP tunnels to be removed
ClosedPublic

Authored by kp on Feb 15 2022, 12:38 PM.
Tags
None
Referenced Files
F106178292: D34288.id102830.diff
Thu, Dec 26, 4:39 PM
F106148569: D34288.diff
Thu, Dec 26, 4:57 AM
Unknown Object (File)
Nov 14 2024, 1:58 PM
Unknown Object (File)
Oct 24 2024, 5:01 AM
Unknown Object (File)
Oct 24 2024, 5:01 AM
Unknown Object (File)
Oct 24 2024, 5:01 AM
Unknown Object (File)
Oct 24 2024, 4:42 AM
Unknown Object (File)
Oct 17 2024, 11:40 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