Skip to content

Commit

Permalink
Add an early exit for lighthouse ips
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Dec 19, 2023
1 parent 605218a commit 7df928a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lighthouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,11 @@ func (lh *LightHouse) Query(ip iputil.VpnIp) *RemoteList {

// QueryServer is asynchronous so no reply should be expected
func (lh *LightHouse) QueryServer(ip iputil.VpnIp) {
if lh.amLighthouse {
// Don't put lighthouse ips in the query channel because we can't query lighthouses about lighthouses
if lh.amLighthouse || lh.IsLighthouseIP(ip) {
return
}

lh.queryChan <- ip
}

Expand Down

0 comments on commit 7df928a

Please sign in to comment.