mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-06-07 02:11:38 +00:00
* new CLI config: flood.max.advert (default 16)
This commit is contained in:
@@ -285,6 +285,7 @@ bool MyMesh::allowPacketForward(const mesh::Packet *packet) {
|
||||
if (packet->isRouteFlood()) {
|
||||
if (packet->getPathHashCount() >= _prefs.flood_max) return false;
|
||||
if (packet->getRouteType() == ROUTE_TYPE_FLOOD && packet->getPathHashCount() >= _prefs.flood_max_unscoped) return false;
|
||||
if (packet->getPayloadType() == PAYLOAD_TYPE_ADVERT && packet->getPathHashCount() >= _prefs.flood_max_advert) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -647,6 +648,7 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
|
||||
_prefs.flood_advert_interval = 47; // 47 hours
|
||||
_prefs.flood_max = 64;
|
||||
_prefs.flood_max_unscoped = 64;
|
||||
_prefs.flood_max_advert = 16;
|
||||
_prefs.interference_threshold = 0; // disabled
|
||||
#ifdef ROOM_PASSWORD
|
||||
StrHelper::strncpy(_prefs.guest_password, ROOM_PASSWORD, sizeof(_prefs.guest_password));
|
||||
|
||||
Reference in New Issue
Block a user