From 7218b5a56c3ec735807b7dccd2ddfa766f6500f8 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 5 Nov 2018 23:12:26 +0000 Subject: [PATCH] Don't look up public keys for Yggdrasil native addresses --- src/yggdrasil/ckr.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/yggdrasil/ckr.go b/src/yggdrasil/ckr.go index f24cd9d5..0e195fd3 100644 --- a/src/yggdrasil/ckr.go +++ b/src/yggdrasil/ckr.go @@ -96,6 +96,12 @@ func (c *cryptokey) addRoute(cidr string, dest string) error { } func (c *cryptokey) getPublicKeyForAddress(addr address) (boxPubKey, error) { + // Check if the address is a valid Yggdrasil address - if so it + // is exempt from all CKR checking + if addr.isValid() { + return + } + // Check if there's a cache entry for this addr if route, ok := c.ipv6cache[addr]; ok { var box boxPubKey