From: Guus Sliepen Date: Sun, 27 Jun 2021 14:19:37 +0000 (+0200) Subject: Don't try to forward packets to a node we don't have a key for. X-Git-Tag: release-1.1pre18~6 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=2c9126ab604fce80d9acd1bbdb485eae50aefcad;p=tinc Don't try to forward packets to a node we don't have a key for. If we got a packet that's meant to be relayed, don't call sptps_send_data() if we don't have a valid key yet for the desination node, but do keep trying to get a working connection to that node. Based on a patch from thorkill. --- diff --git a/src/net_packet.c b/src/net_packet.c index 31c66d32..e0370eda 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -545,7 +545,10 @@ bool receive_tcppacket_sptps(connection_t *c, const char *data, size_t len) { /* If we're not the final recipient, relay the packet. */ if(to != myself) { - send_sptps_data(to, from, 0, data, len); + if(to->status.validkey) { + send_sptps_data(to, from, 0, data, len); + } + try_tx(to, true); return true; }