mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Merge branch 'develop' into netconn
This commit is contained in:
		
						commit
						efc0b9ef9f
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -263,7 +263,6 @@ func (c *cryptokey) addRemoteSubnet(cidr string, dest string) error {
 | 
				
			||||||
// length specified in bytes) from the crypto-key routing table. An error is
 | 
					// length specified in bytes) from the crypto-key routing table. An error is
 | 
				
			||||||
// returned if the address is not suitable or no route was found.
 | 
					// returned if the address is not suitable or no route was found.
 | 
				
			||||||
func (c *cryptokey) getPublicKeyForAddress(addr address.Address, addrlen int) (crypto.BoxPubKey, error) {
 | 
					func (c *cryptokey) getPublicKeyForAddress(addr address.Address, addrlen int) (crypto.BoxPubKey, error) {
 | 
				
			||||||
	c.mutexcaches.RLock()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Check if the address is a valid Yggdrasil address - if so it
 | 
						// Check if the address is a valid Yggdrasil address - if so it
 | 
				
			||||||
	// is exempt from all CKR checking
 | 
						// is exempt from all CKR checking
 | 
				
			||||||
| 
						 | 
					@ -285,11 +284,11 @@ func (c *cryptokey) getPublicKeyForAddress(addr address.Address, addrlen int) (c
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Check if there's a cache entry for this addr
 | 
						// Check if there's a cache entry for this addr
 | 
				
			||||||
 | 
						c.mutexcaches.RLock()
 | 
				
			||||||
	if route, ok := (*routingcache)[addr]; ok {
 | 
						if route, ok := (*routingcache)[addr]; ok {
 | 
				
			||||||
		c.mutexcaches.RUnlock()
 | 
							c.mutexcaches.RUnlock()
 | 
				
			||||||
		return route.destination, nil
 | 
							return route.destination, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	c.mutexcaches.RUnlock()
 | 
						c.mutexcaches.RUnlock()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	c.mutexremotes.RLock()
 | 
						c.mutexremotes.RLock()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue