mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-11 13:53:58 +01:00
Updated LightHouse addrMap (markdown)
parent
fc14749120
commit
9f6d9480d1
@ -11,3 +11,6 @@ A LigthHouse contains an `addrMap` (`map[iputil.VpnIp]*RemoteList`) mapping all
|
|||||||
`RemoteList.hr` (`*hostnamesResults` ) is a struct used by `RemoteList` primarily to manage a background goroutine polling for DNS updates to static_host_map entries. When `LightHouse` is (re-)loaded `addStaticRemotes` iterates all the entries and calls `NewHostnameResults` for each VPN IP listed. During construction, Nebula separates ip:port entries from host:port entries. The ip:port entries are immediately stored in the `hostnameResults` and returned. Meanwhile a background goroutine begins to poll the configured DNS server for hostnames on a configured cadence.
|
`RemoteList.hr` (`*hostnamesResults` ) is a struct used by `RemoteList` primarily to manage a background goroutine polling for DNS updates to static_host_map entries. When `LightHouse` is (re-)loaded `addStaticRemotes` iterates all the entries and calls `NewHostnameResults` for each VPN IP listed. During construction, Nebula separates ip:port entries from host:port entries. The ip:port entries are immediately stored in the `hostnameResults` and returned. Meanwhile a background goroutine begins to poll the configured DNS server for hostnames on a configured cadence.
|
||||||
|
|
||||||
The background goroutine loop attempts to resolve all known DNS names and IP addresses (which are returned unmodified.) DNS resolution errors are logged but otherwise ignored. When the goroutine finishes, the previous list of ip:port entries is combined against the new list of ip:port entries. If there is any difference, the old list is replaced with the new list. **This means that any temporary DNS failures will result in temporarily "forgetting" an ip:port combination. If all DNS queries fail, Nebula will forget _all_ associated ip:port combinations.** Normally this is not an issue as the static_host_map is mainly used to connect to the Lighthouse, and connections to the Lighthouse tend to be persistent once established.
|
The background goroutine loop attempts to resolve all known DNS names and IP addresses (which are returned unmodified.) DNS resolution errors are logged but otherwise ignored. When the goroutine finishes, the previous list of ip:port entries is combined against the new list of ip:port entries. If there is any difference, the old list is replaced with the new list. **This means that any temporary DNS failures will result in temporarily "forgetting" an ip:port combination. If all DNS queries fail, Nebula will forget _all_ associated ip:port combinations.** Normally this is not an issue as the static_host_map is mainly used to connect to the Lighthouse, and connections to the Lighthouse tend to be persistent once established.
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
Loading…
x
Reference in New Issue
Block a user