mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 08:41:19 -08:00
Prepare for shared socket policy for DERP, control, and log uploads. Callers need to configure options such as TCP user timeout on the same socket that netns configures to avoid routing loops. Use ControlContext for dialer namespace setup and run any caller-supplied ControlContext afterward, only if namespace setup succeeds. Reject a non-nil Control unconditionally with a panic directing callers to ControlContext, including when netns is disabled, rather than support both hook types and their precedence rules. Listener Control hooks remain unchanged. Existing in-tree FromDialer callers supply neither hook, so no caller migration is required. Keep socket defaults and proxy-wrapping behavior unchanged. Test hook ordering, context and argument forwarding, errors, legacy-hook rejection, disabled mode, and proxy delegation. Updates tailscale/corp#50948 Change-Id: I9d778273f3257fe8a298463ef29ec2dd5d5fb7b0 Signed-off-by: James Tucker <[email protected]>