* onPeerPathRecv() refactored: 'reciprocal path' now handled in Mesh class, not in application layer

Этот коммит содержится в:
Scott Powell
2025-01-21 18:39:55 +11:00
родитель de27dfacb6
Коммит 96724cd26a
8 изменённых файлов: 30 добавлений и 28 удалений
+2 -1
Просмотреть файл
@@ -299,7 +299,7 @@ protected:
}
}
void onPeerPathRecv(mesh::Packet* packet, int sender_idx, const uint8_t* secret, uint8_t* path, uint8_t path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len) override {
bool onPeerPathRecv(mesh::Packet* packet, int sender_idx, const uint8_t* secret, uint8_t* path, uint8_t path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len) override {
// TODO: prevent replay attacks
int i = matching_peer_indexes[sender_idx];
@@ -312,6 +312,7 @@ protected:
}
// NOTE: no reciprocal path send!!
return false;
}
public: