diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-25 20:33:59 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-25 20:38:33 +0900 |
commit | b4e2d9e440a4eb6d3091a7c586d2e55b69ec968a (patch) | |
tree | 68af74b393dda96a33d47a995b8c3f12680e51e2 /internal/pkg/table/policy.go | |
parent | 6e81f596b1e924337470417cf1e3faa3260308da (diff) |
table: replace radix with crit-bit algo for longer-prefixes search
faster and less memory usage.
Now go-radix has gone.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal/pkg/table/policy.go')
-rw-r--r-- | internal/pkg/table/policy.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go index 32626c6d..08636991 100644 --- a/internal/pkg/table/policy.go +++ b/internal/pkg/table/policy.go @@ -1443,7 +1443,7 @@ func (c *PrefixCondition) Evaluate(path *Path, _ *PolicyOptions) bool { return false } - r := pathToIPNet(path) + r := nlriToIPNet(path.GetNlri()) ones, _ := r.Mask.Size() masklen := uint8(ones) result := false |