Prevent receive_tcppacket_sptps from forwarding data when we are in handshake phase with those nodes
Forwarding data to node which does not have vaildkey yet would destroy the running handshake.
This commit is contained in:
parent
0edef996a6
commit
dc8ee9e6d1
1 changed files with 5 additions and 2 deletions
|
@ -470,8 +470,11 @@ bool receive_tcppacket_sptps(connection_t *c, const char *data, int len) {
|
||||||
/* If we're not the final recipient, relay the packet. */
|
/* If we're not the final recipient, relay the packet. */
|
||||||
|
|
||||||
if(to != myself) {
|
if(to != myself) {
|
||||||
send_sptps_data(to, from, 0, data, len);
|
if (!to->status.waitingforkey) {
|
||||||
try_tx(to, true);
|
send_sptps_data(to, from, 0, data, len);
|
||||||
|
try_tx(to, true);
|
||||||
|
} else
|
||||||
|
logger(DEBUG_ALWAYS, LOG_INFO, "Cannot forward TCP packet from %s (%s) to %s (%s) because we are still wating for key", from->name, from->hostname, to->name, to->hostname);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue