Repository navigation
Conversation
rnstatus from RNS 1.5.x reads ifstat["txdrp"] (and then "txdrb") without checking for the key, and ifstat["mtu"] whenever "bitrate" is present, so a remote status query against a microReticulum node crashed the client with a KeyError right after the first interface. Add mtu (HW_MTU, or the Reticulum MTU when the interface has none) and txdrp/txdrb/txbuffered/txstalled as zeros: there is no TX drop accounting on this side yet, and zero is what a Python interface without drops reports.
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.
Problem
rnstatus -Rfrom RNS 1.5.x stops with aKeyErroragainst a microReticulum transport node, right after it prints the first interface's header.RNS/Utilities/rnstatus.py(1.5.4) reads some interface keys without checking they are there, and microReticulum's remote status reply does not send them:if ifstat["txdrp"]:, thenifstat['txdrb']ifstat['mtu'], wheneverbitrateis setifstat["txbuffered"],ifstat["txstalled"]This affects anyone managing a microReticulum node remotely with
rnstatus -R.Change
remote_status_pack_interfaceadds five keys to each interface:mtu(the interface'sHW_MTU, or the Reticulum MTU when it has none), andtxdrp,txdrb,txbuffered,txstalledas 0. microReticulum does no TX drop accounting yet, and 0 is what a Python interface without drops reports. The map size goes from 18 to 23.Compatibility
Keys are only added. Clients that ignore unknown keys see no difference.
Testing
native,native14,native17,native20with unit tests, plus the four embedded builds). All green: https://github.com/cvaldess/microReticulum/actions/runs/36159150547rnsd/rnstatus1.5.4 on a Linux host:rnstatus -R <transport identity> -i <management identity>now lists both interfaces of a node one hop away (TCPClientInterface, MTU 1064; LoRaInterface, MTU 508), and the LoRa interface of a node two hops away over LoRa. Without the change, the same command stopped with theKeyError.