Phone admin work (#4599)

* Don't throw an error on the sessionkey admin tag

* Throw an error on packet sent to 0
This commit is contained in:
Jonathan Bennett 2024-08-31 15:04:35 -05:00 committed by GitHub
parent 33eb073535
commit b71e12c5e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -259,6 +259,9 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
fromRadioScratch.config.payload_variant.security = config.security;
break;
case meshtastic_Config_sessionkey_tag:
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
break;
default:
LOG_ERROR("Unknown config type %d\n", config_state);
}

View File

@ -165,6 +165,9 @@ meshtastic_QueueStatus Router::getQueueStatus()
ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
{
if (p->to == 0) {
LOG_ERROR("Packet received with to: of 0!\n");
}
// No need to deliver externally if the destination is the local node
if (p->to == nodeDB->getNodeNum()) {
printPacket("Enqueued local", p);