Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/companion_radio/DataStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ File file = openRead(_getContactsChannelsFS(), "/contacts3");

if (!success) break; // EOF

if (c.out_path_len != OUT_PATH_UNKNOWN && !mesh::Packet::isValidPathLen(c.out_path_len)) {
c.out_path_len = OUT_PATH_UNKNOWN; // corrupt entry: rediscover the path rather than send DIRECT on a bad one
}

c.id = mesh::Identity(pub_key);
if (!host->onContactLoaded(c)) full = true;
}
Expand Down
4 changes: 4 additions & 0 deletions examples/simple_secure_chat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ class MyMesh : public BaseChatMesh, ContactVisitor {

if (!success) break; // EOF

if (c.out_path_len != OUT_PATH_UNKNOWN && !mesh::Packet::isValidPathLen(c.out_path_len)) {
c.out_path_len = OUT_PATH_UNKNOWN; // corrupt entry: rediscover the path rather than send DIRECT on a bad one
}

c.id = mesh::Identity(pub_key);
c.lastmod = 0;
if (!addContact(c)) full = true;
Expand Down
4 changes: 4 additions & 0 deletions src/helpers/ClientACL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ void ClientACL::load(FILESYSTEM* fs, const mesh::LocalIdentity& self_id) {

if (!success) break; // EOF

if (c.out_path_len != OUT_PATH_UNKNOWN && !mesh::Packet::isValidPathLen(c.out_path_len)) {
c.out_path_len = OUT_PATH_UNKNOWN; // corrupt entry: rediscover the path rather than send DIRECT on a bad one
Comment thread
ptr727 marked this conversation as resolved.
}

c.id = mesh::Identity(pub_key);
self_id.calcSharedSecret(c.shared_secret, pub_key); // recalculate shared secrets in case our private key changed
if (num_clients < MAX_CLIENTS) {
Expand Down
Loading