Page MenuHomeFreeBSD

netinet: allow UDP tunnels to be removed
ClosedPublic

Authored by kp on Feb 15 2022, 12:38 PM.
Tags
None
Referenced Files
F157573508: D34288.id102830.diff
Fri, May 22, 11:30 PM
Unknown Object (File)
Thu, May 21, 8:20 PM
Unknown Object (File)
Mon, May 18, 4:55 AM
Unknown Object (File)
Fri, May 15, 2:05 PM
Unknown Object (File)
Wed, May 13, 2:50 PM
Unknown Object (File)
Tue, May 12, 5:12 PM
Unknown Object (File)
Mon, May 11, 5:30 PM
Unknown Object (File)
Sun, May 10, 8:51 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44461
Build 41349: arc lint + arc unit