diff options
| author | Claus Lensbøl <claus@tailscale.com> | 2026-01-15 09:04:20 -0500 |
|---|---|---|
| committer | Claus Lensbøl <claus@tailscale.com> | 2026-01-27 16:46:38 -0500 |
| commit | da28a92b22108aa366af4485c835b8feb11c4c03 (patch) | |
| tree | 3a390f29614e39f33169bfa103f4b1cd532b9d85 /feature/debugportmapper/debugportmapper.go | |
| parent | 8c17d871b33ade8ebf8e2a6c5e136f06c4019cd2 (diff) | |
| download | tailscale-cmol/run_portmapper_in_exec_queue.tar.xz tailscale-cmol/run_portmapper_in_exec_queue.zip | |
net/portmapper: put mappings and releases into an execqueuecmol/run_portmapper_in_exec_queue
We had an issue where releasing mappings would cause a deadlock when the
UPnP gateway did not respond. Instead of working on mappings sync, put
it into an exec queue and add a timeout on releasing the mappings.
Updates tailscale/corp#33888
Updates tailscale/corp#33619
Signed-off-by: Claus Lensbøl <claus@tailscale.com>
Diffstat (limited to 'feature/debugportmapper/debugportmapper.go')
| -rw-r--r-- | feature/debugportmapper/debugportmapper.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/feature/debugportmapper/debugportmapper.go b/feature/debugportmapper/debugportmapper.go index 2625086c6..0a1038436 100644 --- a/feature/debugportmapper/debugportmapper.go +++ b/feature/debugportmapper/debugportmapper.go @@ -109,10 +109,11 @@ func serveDebugPortmap(h *localapi.Handler, w http.ResponseWriter, r *http.Reque var c *portmapper.Client c = portmapper.NewClient(portmapper.Config{ - Logf: logger.WithPrefix(logf, "portmapper: "), - NetMon: h.LocalBackend().NetMon(), - DebugKnobs: debugKnobs, - EventBus: h.LocalBackend().EventBus(), + ShutdownCtx: ctx, + Logf: logger.WithPrefix(logf, "portmapper: "), + NetMon: h.LocalBackend().NetMon(), + DebugKnobs: debugKnobs, + EventBus: h.LocalBackend().EventBus(), OnChange: func() { logf("portmapping changed.") logf("have mapping: %v", c.HaveMapping()) |
