Bugfix: auto-adverts don't support multi-byte prefixes#2035
Closed
jourdant wants to merge 2 commits intomeshcore-dev:mainfrom
Closed
Bugfix: auto-adverts don't support multi-byte prefixes#2035jourdant wants to merge 2 commits intomeshcore-dev:mainfrom
jourdant wants to merge 2 commits intomeshcore-dev:mainfrom
Conversation
…xed sendFlood call to support multiple byte paths
Collaborator
|
Thanks for surfacing this. I have pushed a change to fix this directly, as there were problems with this PR (compilation errors, and wrong base branch -- should be 'dev'). |
Author
|
Apologies on wrong base branch. Thanks for addressing so quickly! |
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.
It was highlighted in the Sydney channel of the MeshCore Australia discord community by 👽 wazmac when a node configured with 2 byte hash mode (path.hash.mode 1 = 2 byte), that automatic adverts were still being sent out as single byte.
I checked out the repeater, room_server and sensor code and found the bug in repeater and room_server. This was already fixed for sensor. In the
MyMesh::loop()function, sendFlood was not passing the byte path preference. I've submitted minor fixes in this PR.It's also worth noting this is a latent bug in the
BaseChatMeshclass. companion_radio inherits this base class but overrides with the correct prefs injected, but simple_secure_chat does have this issue. In this case simple_secure_chat doesn't have a preference for path.hash.mode. I have used one of the unused bytes in NodePrefs to store the path_hash_mode and fixed the bug in this class too.