mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Only validate CKR routes if CKR enabled
This commit is contained in:
parent
19e6aaf9f5
commit
f0947223bb
3 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue