Skip to content

Feat/fix regions#170

Open
zindello wants to merge 2 commits intorightup:devfrom
zindello:feat/fixRegions
Open

Feat/fix regions#170
zindello wants to merge 2 commits intorightup:devfrom
zindello:feat/fixRegions

Conversation

@zindello
Copy link
Copy Markdown

@zindello zindello commented Apr 7, 2026

This PR fixes the region handling in pyMC Repeater.

Previously in pyMC Repeater, the unscoped region, poorly named by Meshcore as "" was interperitred as a "global" or "wildcard" handling. An easy mistake to make, the actual meaning of "" is "unscoped" - that is that no region is defined to the packets, and "" is what is used to permit/block unscoped traffic. Is essenence the "" is actually representative of the "unscoped" region - confusing, hey?

Regions themselves are subject to a separate handler - no wildcard concept exists in the mainstream firmware, and as such regions need to be configured on a case-by-case as configured in the repeater. If the region is not configured, the repeaters behaviour is to drop traffic with a scope set that the repeater doesn't know about.

This PR removes the "Global" concept from pyMC and replaces it with two separate concepts

  1. The ability to block/unblock "unscoped" flood traffic
  2. The ability allow/deny regions based on the configured scope, at the repeater level, as before.

Pending: UI changes to support the changes. If this PR is merged right now, clicking the Allow/Deny in the UI will break the config page for Regions/Keys.

The PR has been setup to introduce a new variable "unscoped_flood_allow" to replace the "global_flood_allow" variable previously used, while maintaining backward compatability with the config files if "global_flood_allow" has been configured and the new "unscoped_flood_allow" is missing.

Question: What is the "Keys" section in regions/keys used for? It seems a bit misleading as to what it's meant to be in the UI. Can we remove the keys concept entirely and just leave it as Regions, as that would match what is in the upstream firmware?

Joshua Mesilane added 2 commits April 6, 2026 22:32
…lly mean wildcard, it means unscoped. Region keys should still only be forwaded if they're whitelisted. UI changes pending
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.

1 participant