mirror of
https://github.com/fosrl/newt.git
synced 2026-07-16 03:46:25 -05:00
- Fix prefix canonicalization: use Masked() to handle host bits correctly
(e.g., 10.0.0.5/24 and 10.0.0.0/24 are now treated as equal)
- Fix empty trie cleanup: use BART's Size() method to check if trie is empty
instead of relying on rules slice length, preventing stale entries
- Fix go.mod: move BART from indirect to direct dependencies
These fixes ensure proper bookkeeping and prevent memory leaks from
empty tries hanging around after rule removal.
Former-commit-id: 9738565a3a