From 229de91a3ae35cf0b088fc6064494cb8a9ab3a4b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 12 Mar 2019 15:01:27 +0000 Subject: [PATCH] Fix AllowedEncryptionPublicKeys so that it works in incoming connections and not outgoing ones --- src/yggdrasil/link.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yggdrasil/link.go b/src/yggdrasil/link.go index 9c9223b..10c7e0b 100644 --- a/src/yggdrasil/link.go +++ b/src/yggdrasil/link.go @@ -175,7 +175,7 @@ func (intf *linkInterface) handler() error { return errors.New("failed to connect: wrong version") } // 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", strings.ToUpper(intf.info.linkType), intf.info.remote, hex.EncodeToString(meta.box[:])) intf.msgIO.close()