mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-06 02:30:57 -08:00
yeet
This commit is contained in:
parent
eec0cd34f4
commit
47ca7521bc
1 changed files with 9 additions and 3 deletions
|
|
@ -631,13 +631,19 @@ func (lh *LightHouse) addCalculatedRemotes(vpnAddr netip.Addr) bool {
|
||||||
return len(calculatedV4) > 0 || len(calculatedV6) > 0
|
return len(calculatedV4) > 0 || len(calculatedV6) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// unlockedGetRemoteList
|
// unlockedGetRemoteList assumes you have the lh lock
|
||||||
// assumes you have the lh lock
|
|
||||||
func (lh *LightHouse) unlockedGetRemoteList(allAddrs []netip.Addr) *RemoteList {
|
func (lh *LightHouse) unlockedGetRemoteList(allAddrs []netip.Addr) *RemoteList {
|
||||||
// before we go and make a new remotelist, we need to make sure we don't have one for any of this set of vpnaddrs yet
|
// before we go and make a new remotelist, we need to make sure we don't have one for any of this set of vpnaddrs yet
|
||||||
for _, addr := range allAddrs {
|
for i, addr := range allAddrs {
|
||||||
am, ok := lh.addrMap[addr]
|
am, ok := lh.addrMap[addr]
|
||||||
if ok {
|
if ok {
|
||||||
|
if i != 0 {
|
||||||
|
//if we had a record in the cache for a non-primary IPI
|
||||||
|
for _, x := range allAddrs {
|
||||||
|
lh.addrMap[x] = am
|
||||||
|
}
|
||||||
|
lh.addrMap[addr] = am
|
||||||
|
}
|
||||||
return am
|
return am
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue