Add OR logic filters for multiple values of same type#260
Merged
Conversation
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Co-authored-by: digizeph <659667+digizeph@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enable filtering with multiple entries using OR logic
Add OR logic filters for multiple values of same type
Jan 20, 2026
digizeph
approved these changes
Jan 29, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #260 +/- ##
==========================================
- Coverage 91.39% 91.22% -0.17%
==========================================
Files 84 83 -1
Lines 15078 14823 -255
==========================================
- Hits 13780 13522 -258
- Misses 1298 1301 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables filtering on multiple values of the same filter type using OR logic. Previously, users could only specify a single value per filter type (except
peer_ips).Changes
New filter variants with OR semantics:
origin_asns- comma-separated origin ASNsprefixes,prefixes_super,prefixes_sub,prefixes_super_sub- comma-separated prefixes with match typespeer_asns- comma-separated peer ASNsImplementation:
Filter::OriginAsns(Vec<u32>),Filter::Prefixes(Vec<IpNet>, PrefixMatchType),Filter::PeerAsns(Vec<u32>)variantsparse_asn_list(),parse_prefix_list(),parse_ip_list()to handle comma-separated values.any()for OR logic within each filterpeer_ipsto use same validation pattern!prefixUsage:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
spaces.bgpkit.org/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d /home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d parser::filter:: /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8c193fefe02d6c/out/4433246e317b5e42-bignum_deamont_p384_alt.o -I /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8c193fefe02d6c/out/4433246e317b5e42-bignum_montinv_p384.o 6.0/generated-include --64 6.0/include -o 6.0/aws-lc/include /tmp/ccPfqY2j.s 6.0/aws-lc/third_party/s2n-bignum/include 193f�� 6.0/aws-lc/third_party/s2n-bignum/s2n-bignum-imported/include f/aws-lc-sys-0.3-gdwarf-4 6.0/aws-lc/third_party/jitterentropy/jitterentropy-library -1949cf8c6b5b557as -1949cf8c6b5b557-I -1949cf8c6b5b557/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8c193fefe02d6c/out/020bc241f4dae036-edwards25519_scalarmulbase_alt.o -1949cf8c6b5b557-I(dns block)/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d /home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d parser::filter::tests --destination-port 53 -j ACCEPT f/aws-lc-sys-0.3-gdwarf-4 f/aws-lc-sys-0.3-fno-omit-frame-pointer f/aws-lc-sys-0.3ar -1949cf8c6b5b557cq f/aws-lc-sys-0.3/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8c193fefe02d6c/out/libaws_lc_0_36_0_crypto.a -1949cf8c6b5b557/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8c193fefe02d6c/out/020bc241f4dae036-edwards25519_encode.o f/aw�� f/aws-lc-sys-0.3/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/build/aws-lc-sys-ba8cgit 473964a5e4cb8d lib/rustlib/x86_64-REDACTED-linux-gnu/bin/rust-lld f/aws-lc-sys-0.3iptables f/aws-lc-sys-0.3-w f/aws-lc-sys-0.3-t lib/rustlib/x86_security(dns block)/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d /home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e473964a5e4cb8d parser::filter::tests 473964a5e4cb8d.0fr5y8000t2haei2tun5vv2xu.0i7ocon.rcgu.o 473964a5e4cb8d.0jbwr6vpdjshqogyx6a1rcmk5.0i7ocon.rcgu.o 473964a5e4cb8d.0sqr7g9axebu7k7jnu889mrya.0i7ocon.rcgu.o 473964a5e4cb8d.0ur6uib4xb3tat8jdt2lo6nc8.0i7ocon.rcgu.o 473964a5e4cb8d.0zw06cv0rrsq71kb2k8pgn1tf.0i7ocon.rcgu.o 473964a5e4cb8d.10q0msx0fridp0ws6c8yga6ab.0i7ocon.rcgu.o 473964a5e4cb8d.10y229gwkl76y4yebvkfbdptc.0i7ocon.rcgu.o 473964a5e4cb8d.13s869p76t0rops04paijwfai.0i7ocon.rcgu.o 473964a5e4cb8d.14by1nqxkzjp6erpu76vq2hb4.0i7ocon.rcgu.o 473964a5e4cb8d.14hu5hxone6okpkxvktcz3br2.0i7ocon.rcgu.o 4739�� 473964a5e4cb8d.15t59xk5xxdsd3xqnh96bqxdp.0i7ocon.rcgu.o 473964a5e4cb8d.1gsfupinj8nxwxdsc04inlypk.0i7ocon.rcgu.o /index.crates.io/home/REDACTED/work/bgpkit-parser/bgpkit-parser/target/debug/deps/bgpkit_parser-4e--noprofile orted/include orted/include py-library /index.crates.ioorigin(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.