diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2017-02-07 12:02:02 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2017-02-13 18:55:34 -0500 |
commit | c45b9fb54c5ca068a5e276c3bd6ebf4ae720f6f7 (patch) | |
tree | 0bdc565d53b939f0f227b108406c82f034cb5e61 /src/threadinterrupt.cpp | |
parent | d304fef3746039183f51b3ac8f4774dcf3a64f59 (diff) |
net: correctly ban before the handshake is complete
7a8c251901 made a change to avoid getting into SendMessages() until the
version handshake (VERSION + VERACK) is complete. That was done to avoid
leaking out messages to nodes who could connect, but never bothered sending
us their version/verack.
Unfortunately, the ban tally and possible disconnect are done as part of
SendMessages(). So after 7a8c251901, if a peer managed to do something
bannable before completing the handshake (say send 100 non-version messages
before their version), they wouldn't actually end up getting
disconnected/banned. That's fixed here by checking the banscore as part of
ProcessMessages() in addition to SendMessages().
Diffstat (limited to 'src/threadinterrupt.cpp')
0 files changed, 0 insertions, 0 deletions