Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support matching ip interface id for ip_cidr rule #2209

Open
wants to merge 7 commits into
base: dev-next
Choose a base branch
from

Conversation

blip
Copy link

@blip blip commented Oct 21, 2024

Added support for matching IPv6's interface id, using a syntax like ::1/::ff in ip_cidr and source_ip_cidr.

Fix #2204

cc @dyhkwong

@nekohasekai nekohasekai force-pushed the dev-next branch 2 times, most recently from b0565b2 to 0b5c32a Compare October 22, 2024 03:40
@dyhkwong

This comment was marked as outdated.

@blip
Copy link
Author

blip commented Oct 22, 2024

Not sure i quite understand

This is only a syntactic sugar of existing functionality.

Maybe I missed something, but how can an interface id currently be matched without this PR?

CIDR is also used elsewhere, e.g. tun.address, tun.route_address and tun.route_exclude_address.

These are not matching rules? Are you suggesting they should also support the ::1/:ff syntax? But this syntax is not a valid address.

@dyhkwong
Copy link
Contributor

dyhkwong commented Oct 22, 2024

Maybe I missed something, but how can an interface id currently be matched without this PR?

So this is in fact something like #2014?

@blip
Copy link
Author

blip commented Oct 22, 2024

yep, that person was asking the same feature. But it's not really syntactic sugar if it's not already achievable with the current rules, imho.

@dyhkwong
Copy link
Contributor

Maybe this should be a new type of rule. And the author of #2014 mentioned that this is also for tun.route_address_set?

@nekohasekai nekohasekai force-pushed the dev-next branch 4 times, most recently from 6740910 to 58feb8e Compare October 30, 2024 02:24
@nekohasekai nekohasekai force-pushed the dev-next branch 12 times, most recently from 78f8093 to ac6401b Compare November 7, 2024 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ::1/::FF for ip_cidr and source_ip_cidr?
3 participants