Skip to content

Bugfix: auto-adverts don't support multi-byte prefixes#2035

Closed
jourdant wants to merge 2 commits intomeshcore-dev:mainfrom
jourdant:bugfix/auto-advert-path-issue
Closed

Bugfix: auto-adverts don't support multi-byte prefixes#2035
jourdant wants to merge 2 commits intomeshcore-dev:mainfrom
jourdant:bugfix/auto-advert-path-issue

Conversation

@jourdant
Copy link

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 BaseChatMesh class. 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.

@jourdant jourdant changed the title Bugfix: auto-adverts should obey _prefs.path_hash_mode Bugfix: auto-adverts don't support multi-byte prefixes Mar 15, 2026
@ripplebiz
Copy link
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').

@ripplebiz ripplebiz closed this Mar 16, 2026
@jourdant
Copy link
Author

Apologies on wrong base branch. Thanks for addressing so quickly!

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

Successfully merging this pull request may close these issues.

2 participants