mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Fix AllowedEncryptionPublicKeys so that it works in incoming connections and not outgoing ones
This commit is contained in:
		
							parent
							
								
									43643e0307
								
							
						
					
					
						commit
						229de91a3a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -175,7 +175,7 @@ func (intf *linkInterface) handler() error {
 | 
				
			||||||
		return errors.New("failed to connect: wrong version")
 | 
							return errors.New("failed to connect: wrong version")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// Check if we're authorized to connect to this key / IP
 | 
						// Check if we're authorized to connect to this key / IP
 | 
				
			||||||
	if !intf.incoming && !intf.force && !intf.link.core.peers.isAllowedEncryptionPublicKey(&meta.box) {
 | 
						if intf.incoming && !intf.force && !intf.link.core.peers.isAllowedEncryptionPublicKey(&meta.box) {
 | 
				
			||||||
		intf.link.core.log.Warnf("%s connection to %s forbidden: AllowedEncryptionPublicKeys does not contain key %s",
 | 
							intf.link.core.log.Warnf("%s connection to %s forbidden: AllowedEncryptionPublicKeys does not contain key %s",
 | 
				
			||||||
			strings.ToUpper(intf.info.linkType), intf.info.remote, hex.EncodeToString(meta.box[:]))
 | 
								strings.ToUpper(intf.info.linkType), intf.info.remote, hex.EncodeToString(meta.box[:]))
 | 
				
			||||||
		intf.msgIO.close()
 | 
							intf.msgIO.close()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue