Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added modes for rebroadcast #2224

Merged
merged 4 commits into from
Jan 29, 2023
Merged

Added modes for rebroadcast #2224

merged 4 commits into from
Jan 29, 2023

Conversation

thebentern
Copy link
Contributor

Hopefully I got it in the right spot for the local_only cancellation of rebroadcasts

@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2023

🤖 Pull request artifacts

file commit
pr2224-firmware-2.0.16.b165689.zip b165689

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jan 29, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jan 29, 2023
@thebentern thebentern merged commit a1d8960 into master Jan 29, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jan 30, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jan 30, 2023
@@ -60,6 +60,10 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
}
}

if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think LOCAL_ONLY isn’t working correctly like this. Firstly, it will only end up at the clause when it didn’t go to Router::send() before. Secondly, cancelSending is only doing something when there is already a packet with that ID in the queue (in the first clause at line 34 a rebroadcast is canceled when in the meantime it already heard an ACK). Right now I think you will see

“cancelSending id=xxx, removed=0”

meaning nothing is canceled.

I think we should just set encryptedOk in the RoutingModule to false to ensure we don’t rebroadcast encrypted packets. Then, if you configure channels on a repeater with a different PSK than the default, we already also ignore packets from ‘open’ networks, right?

@thebentern thebentern deleted the rebroadcast-modes branch January 30, 2023 19:52
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