Only validate CKR routes if CKR enabled

This commit is contained in:
Neil Alexander 2018-11-06 11:11:57 +00:00
parent 19e6aaf9f5
commit f0947223bb
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 9 additions and 7 deletions

View file

@ -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
}
}
}