Skip to content

Conversation

@JackDoan
Copy link
Collaborator

@JackDoan JackDoan commented Sep 3, 2025

Fixes #1447

  • The config of Nebula included a static host mapping for one IP of the host. The host's certificate includes multiple IPs. Spelunking through the code, the function DeleteVpnAddrs is updated in master to support a host with multiple IPs. However, that function will only skip address deletion if the first IP in the certificate is recorded as having a static host mapping entry. We believe that in the user's reported case, the first IP in the host cert was not the IP listed in the config's static host mapping.

  • Reading through the code to investigate this issue, I noticed that unlockedGetRemoteList may also overwrite a static mapping if it receives a list of IP's and if the first IP in the slice is not in the addrMap but any subsequent IP is in the map. In that case, the subsequent IP entries will be overwritten by the newly created entry.

  • To close this issue, investigate the lighthouse addrMap to cover the scenario in which a given host's secondary IP appears in the static host map.

  • Add tests to prove this is fixed!

@JackDoan JackDoan self-assigned this Sep 3, 2025
@JackDoan JackDoan force-pushed the dont-trample-static-host-mappings-for-multi-ip branch from e21f24f to 88d9085 Compare September 3, 2025 14:33
@JackDoan JackDoan force-pushed the dont-trample-static-host-mappings-for-multi-ip branch from 88d9085 to 8d68931 Compare September 3, 2025 18:03
@JackDoan JackDoan marked this pull request as ready for review September 4, 2025 16:07
@JackDoan JackDoan force-pushed the dont-trample-static-host-mappings-for-multi-ip branch from 076b5b3 to 0b127be Compare September 4, 2025 19:26
@JackDoan JackDoan merged commit 932e329 into master Sep 4, 2025
9 checks passed
@JackDoan JackDoan deleted the dont-trample-static-host-mappings-for-multi-ip branch September 4, 2025 19:49
@wadey wadey added this to the v1.10.0 milestone Sep 10, 2025
@nbrownus nbrownus mentioned this pull request Nov 19, 2025
63 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 BUG: Nebula may lose a static host mapping

4 participants