mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-17 10:36:52 +01:00
Attach a pending handshake's RemoteList when the handshake starts (#1909)
StartHandshake returned a hostinfo with no RemoteList; handleOutbound attached one lazily on its first tick. Anything that touched the pending host before then, notably create-tunnel -address, dereferenced nil and took the daemon down. StartHandshake now attaches the lighthouse's list as it builds the hostinfo. To keep the surrounding locking sound, a lighthouse now resolves a punch target before taking the querier's RemoteList lock, and closeTunnel deletes the host and evicts its RemoteList under a single hostmap write lock so a completing handshake cannot land in between. The lock order, now documented on the handshake manager mutex, is hostmap, then handshake manager, then lighthouse, then RemoteList; no RemoteList lock is ever held across a hostmap lookup.
This commit is contained in:
1 parent
d5062dacf0
commit
f9b0853476
8 files changed
+213
-27
No files matched your search
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- `create-tunnel -address <ip:port>` panicked on a nil RemoteList and, over the ssh debug server, took nebula
|
||||
down with it. A hostinfo returned by StartHandshake had no RemoteList until the handshake loop's first
|
||||
pass attached one, and `create-tunnel -address` set the remote before that. The list is now attached when
|
||||
the handshake starts, so a pending hostinfo never exists without one.
|
||||
|
||||
## [1.11.1] - 2026-08-21
|
||||
|
||||
See the [v1.11.1](https://github.com/slackhq/nebula/milestone/30?closed=1) milestone for a complete list of changes.
|
||||
|
||||
Reference in new issue
Block a user