Skip to content

Conversation

Sword-Smith
Copy link
Member

@Sword-Smith Sword-Smith commented Oct 14, 2025

Refuse connection if peer reports a timestamp that's 90 seconds different from ours.

Previously only a warning was logged but the network has seen some light DOS, and this disallows the reuse of the handshake, so I consider it a step in the right direction.

If the peer that the connection is made with reports another timestamp
in the handshake, then the connection is refused.

This change is made because it disallows a DOS'er to reuse the
handshake. More DOS protection should of course be made but this is
already a step in the right direction.

The limit is set to 90 seconds which should be enough on even bad
connections. This limit is in the same order of magnitude as the
standard timeout of a TCP connection, 72 seconds on Windows.

https://serverfault.com/questions/193160/which-is-the-default-tcp-connect-timeout-in-windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant