Repository navigation
fix(fsm): omit Extensions Supported from Session Initialization when none are advertised - #1
Merged
Conversation
…none are advertised RFC 8175 section 12.5 has the router include Extensions Supported when it supports extensions, and has the modem read an absent item as none. The router sent a zero-length item instead, which stricter modems reject: OLSR/OONF's dlep_radio resets the session with "TLV 6 has wrong size". The item is now sent only when advertised_extensions is non-empty.
asmie
self-requested a review
October 5, 2026 21:02
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.
The router always puts an Extensions Supported data item in its Session
Initialization message, even when it advertises no extensions, so it sends a
zero-length item. OLSR/OONF's DLEP modem (
dlep_radio, commit477e716)refuses it and resets the session:
The router then sees
session down: StatusCode(129).RFC 8175 §12.5: "If DLEP extensions are supported, the Session Initialization
Message MUST contain an Extensions Supported Data Item", and "If an Extensions
Supported Data Item does not exist in a Session Initialization Message, the
modem MUST conclude that there is no support for extensions in the router."
Leaving the item out is how the RFC says "none", and this crate's modem
already reads an absent item that way.
This change sends the item only when
advertised_extensionsis non-empty. Thecodec is unchanged and still round-trips an empty item.
With the change, a session between this crate's router and OONF's modem comes
up and the modem's session metrics arrive.
Tests, in
crates/dlep-fsm/tests/session_table.rs:router_session_init_omits_extensions_supported_when_none_are_advertisedfails without the change.
router_session_init_lists_the_extensions_it_advertisescargo test --workspace --no-fail-fastin a Linux container gives the sameresults before and after apart from the new tests: 9 IPv6 and multi-interface
discovery tests fail there either way, which looks like the container's
network rather than this change. Clippy (
-D warnings) and rustfmt are clean.build_session_initialization_responseon the modem side does the same. Ileft it alone to keep this small, and because an existing test counts the
response's items. Happy to change it the same way if you want that.