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

Issue in IPv4 prefix length verification for RFC8950 #130

Closed
agbcix opened this issue Mar 26, 2024 · 3 comments
Closed

Issue in IPv4 prefix length verification for RFC8950 #130

agbcix opened this issue Mar 26, 2024 · 3 comments

Comments

@agbcix
Copy link
Contributor

agbcix commented Mar 26, 2024

When a peer is configured for RFC8950 support, the prefix length is checked for the IPv6 limits only.
This will permit too long IPv4 (up to /48) prefixes and will reject short IPv4 (< /12) prefixes.

@agbcix
Copy link
Contributor Author

agbcix commented Mar 26, 2024

I guess it's worthwhile to add (regression) test scenarios to tests/live_tests/scenarios/rfc8950/base.py.

E.g. AS1 could try to announce 1.0.0.0/8 which should be accepted and 1.0.0.0/25 which should be rejected with cause 13.

@agbcix agbcix changed the title IPv4 prefix length verification for RFC8950 fails Issue in IPv4 prefix length verification for RFC8950 Mar 26, 2024
pierky added a commit that referenced this issue Mar 26, 2024
From @agbcix

> When a peer is configured for RFC8950 support, the prefix length is checked for the IPv6 limits only.
> This will permit too long IPv4 (up to /48) prefixes and will reject short IPv4 (< /12) prefixes.
> I guess it's worthwhile to add (regression) test scenarios to tests/live_tests/scenarios/rfc8950/base.py.
> E.g. AS1 could try to announce 1.0.0.0/8 which should be accepted and 1.0.0.0/25 which should be rejected with cause 13.
@pierky
Copy link
Owner

pierky commented Mar 26, 2024

Thanks a lot for reporting this bug. It is being addressed in the issue130_ipv4_prefix_length_check_with_rfc8950 branch, where I've also merged your proposed solution with a change to avoid code duplication.

@pierky
Copy link
Owner

pierky commented Mar 26, 2024

I've just merged the branch into master and triggered the CI/CD pipeline. If everything goes well, we'll have v1.22.1 out with the fix in a couple of hours or in the worst case by tomorrow.
Thanks for reporting the issue and proposing the fix!

@pierky pierky closed this as completed Mar 26, 2024
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

No branches or pull requests

2 participants