diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-21 12:58:11 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-21 13:32:40 +0900 |
commit | 7d5a97862f927e8ba2fb82018e61fb17cd9ffcd2 (patch) | |
tree | 92fa068f6183fc6a20873a22d76d7079b09d9a30 | |
parent | 92012ee629d2d36f51c3fe646cdf5b94c7823078 (diff) |
rpki: validate only when RPKI is enabled
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | server/rpki.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/rpki.go b/server/rpki.go index cb785901..af2c4bb2 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -571,6 +571,11 @@ func validatePath(ownAs uint32, tree *radix.Tree, cidr string, asPath *bgp.PathA } func (c *roaManager) validate(pathList []*table.Path) { + if len(c.clientMap) == 0 { + // RPKI isn't enabled + return + } + for _, path := range pathList { if path.IsWithdraw || path.IsEOR() { continue |