mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
Only validate CKR routes if CKR enabled
This commit is contained in:
@@ -58,9 +58,11 @@ func (c *cryptokey) isValidSource(addr address) bool {
|
||||
}
|
||||
|
||||
// Does it match a configured CKR source?
|
||||
for _, subnet := range c.ipv6sources {
|
||||
if subnet.Contains(ip) {
|
||||
return true
|
||||
if c.isEnabled() {
|
||||
for _, subnet := range c.ipv6sources {
|
||||
if subnet.Contains(ip) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user