-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: correctly check for magic bytes and network in message header
The network bytes (magic bytes), the first 2 byts of the header, were not correctly checked. They were checked in the network class inbound function but that function is called for realtime messages after the handshake is completed. It is not called for bootstrap messages not handshake messages. Also the version checking was not done properly so I am doing it now properly immediately after the magic bytes tests. The checks are done at the following 3 places: * nano::bootstrap_server::receive_header_action * nano::transport::tcp_channels::start_tcp_receive_node_id * nano::message_parser::deserialize_buffer The last one is likely only used by UDP and test scripts that use UDP. So we should be able to remove the last one when we remove the UDP code.
- Loading branch information
Showing
5 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters