Skip to content

Commit

Permalink
Use ip_network_table instead of homegrown trie impl (cloudflare#184)
Browse files Browse the repository at this point in the history
ip_network_table crate is exactly what we need so use it instead of
own trie impl. Big code/complexity reduction. Keep all unit tests.

This in turn uses ip_network and treemap crates, these both
look good too. (wireguard-rs also uses these, fwiw.)

Make small changes to rest of code as needed. AllowedIps interface is
mostly the same but I couldn't resist a few tweaks.
  • Loading branch information
agrover authored Jul 21, 2021
1 parent 3d546aa commit e04a7da
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 458 deletions.
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ libc = "0.2"
parking_lot = "0.10"
slog = "2.5"
slog-term = "2.5"
ip_network = "0.3.4"
ip_network_table = "0.1.2"

[target.'cfg(not(target_arch="arm"))'.dependencies]
ring = "0.16"
Expand Down
Loading

0 comments on commit e04a7da

Please sign in to comment.