Page MenuHomeFreeBSD

netinet: allow UDP tunnels to be removed
ClosedPublic

Authored by kp on Feb 15 2022, 12:38 PM.
Tags
None
Referenced Files
F156670924: D34288.id102830.diff
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
Unknown Object (File)
Sat, May 2, 11:38 PM
Unknown Object (File)
Sat, May 2, 11:17 PM
Unknown Object (File)
Sun, Apr 19, 6:11 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