Fix OTC attribute handling in WASM and withdrawal messages#270
Merged
Fix OTC attribute handling in WASM and withdrawal messages#270
Conversation
- Add test to verify only_to_customer serializes as null (not 0) for messages without OTC attribute - Fix withdrawal elements to not inherit only_to_customer from UPDATE message - Update CHANGELOG with bug fixes Fixes #269
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
==========================================
+ Coverage 90.68% 90.70% +0.02%
==========================================
Files 84 84
Lines 15462 15496 +34
==========================================
+ Hits 14022 14056 +34
Misses 1440 1440 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Documentation fixes: - Fixed broken Elementor links in bgp/mod.rs with proper crate:: prefix - Escaped brackets in ris_subscribe.rs example path pattern - Fixed 5 bare URL warnings by adding angle brackets GitHub Actions improvements: - Consolidated format.yml into build.yml as parallel jobs - Added rust-cache for faster builds - Added documentation check with RUSTDOCFLAGS=-D warnings - Changed MSRV check to use taiki-e/install-action@cargo-msrv - Split monolithic job into parallel: format, doc, clippy, build-and-test, msrv
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.
Summary
This PR fixes two issues related to the "Only To Customer" (OTC) attribute handling:
Bug Fixes
WASM
only_to_customerserialization: Added test to verify that messages without the OTC attribute correctly serializeonly_to_customerasnull(not0) in JSON output. This ensures JavaScript consumers can properly distinguish between "no OTC attribute" (null) and "OTC with AS 0" (0).OTC attribute on withdrawal messages: Withdrawal elements no longer inherit the
only_to_customervalue from their associated UPDATE message. Since the OTC attribute (RFC 9234) is used for route leak detection on route advertisements, it is not semantically meaningful for withdrawals. Withdrawal elements now correctly haveonly_to_customer: null.Changes
src/wasm.rsto verify correct serialization ofOption<Asn>asnullwhen no OTC attribute is presentsrc/wasm.rsto verify BGP UPDATE messages without OTC correctly serializeonly_to_customerasnullsrc/parser/mrt/mrt_elem.rs: withdrawal elements now useonly_to_customer: Noneinstead of inheriting from the UPDATE messageFixes #269