diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-15 10:30:40 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-15 10:30:40 -0800 |
commit | 82aa3f59d6f60995719cc3d857b4fa3bb33df19d (patch) | |
tree | 8e11c5e65697fcb0309d5d36319f50aa3ec67fe6 /node/Packet.hpp | |
parent | 04d6b037334ae2da8523a1c83d9b02c89e9f1da1 (diff) | |
download | infinitytier-82aa3f59d6f60995719cc3d857b4fa3bb33df19d.tar.gz infinitytier-82aa3f59d6f60995719cc3d857b4fa3bb33df19d.zip |
Fix bug in ECHO handling (OK was invalid!), and use ECHO on newer peers for path confirmation. Also get rid of path confirmation circuit breaker since this causes issues with some peers and should be done more intelligently anyway.
Diffstat (limited to 'node/Packet.hpp')
-rw-r--r-- | node/Packet.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp index e0c702ce..6c1b2984 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -678,7 +678,14 @@ public: * <[...] arbitrary payload to be echoed back> * * This generates OK with a copy of the transmitted payload. No ERROR - * is generated. Response to ECHO requests is optional. + * is generated. Response to ECHO requests is optional and ECHO may be + * ignored if a node detects a possible flood. + * + * There is a de-facto standard for ECHO payload. No payload indicates an + * ECHO used for path confirmation. Otherwise the first byte contains + * flags, in which currently the only flag is 0x01 for a user-requested + * echo. For user-requested echoes the result may be reported back through + * the API. Otherwise the payload is for internal use. * * Support for fragmented echo packets is optional and their use is not * recommended. |