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

Possibly forward PKC DMs over MQTT #5012

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Possibly forward PKC DMs over MQTT #5012

merged 1 commit into from
Oct 9, 2024

Conversation

jp-bennett
Copy link
Collaborator

No description provided.

Copy link
Contributor

@ianmcorvidae ianmcorvidae left a comment

Choose a reason for hiding this comment

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

This looks like the fix for the spot I was looking at (unless we need to do any additional guards when MQTT encryption is turned off?); haven't dug through completely to be sure it's the only spot. We may need to mark the packet as pki_encrypted (even though we're not sure it is) with how the MQTT code is currently written, since I think it chooses the publish topic and such based on that. Or push similar checks to this into there as well

@jp-bennett
Copy link
Collaborator Author

@ianmcorvidae I think this logic is already present in MQTT itself.

@thebentern thebentern merged commit ad8747d into master Oct 9, 2024
46 checks passed
@JohnathonMohr
Copy link
Contributor

@jp-bennett just judging from the title - do you expect this to fix #5000? Or is this unrelated?

@jp-bennett
Copy link
Collaborator Author

@jp-bennett just judging from the title - do you expect this to fix #5000? Or is this unrelated?

I believe this is related, yes. Please let me know if this fixes your issue.

@GUVWAF
Copy link
Member

GUVWAF commented Oct 10, 2024

@jp-bennett I don't think this will do anything, it would only lead to:

firmware/src/mqtt/MQTT.cpp

Lines 540 to 542 in ad8747d

if (!mp.pki_encrypted) {
if (mp_decoded.which_payload_variant != meshtastic_MeshPacket_decoded_tag) {
LOG_CRIT("MQTT::onSend(): mp_decoded isn't actually decoded\n");

Because if it was already decoded and it was PKC, pki_encrypted would be set.

Edit: Well, mp is the still-encrypted copy of the packet! So this would never have pki_encrypted set when receiving it.

@caveman99 caveman99 deleted the mqtt-pki branch October 16, 2024 10:57
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.

5 participants