From: Etienne Dechamps Date: Mon, 18 May 2015 19:35:44 +0000 (+0100) Subject: Fix SPTPS condition in try_harder(). X-Git-Tag: release-1.1pre12~151 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=643149b44991121c618a2412c64072ad22955991 Fix SPTPS condition in try_harder(). A condition in try_harder() is always evaluating to false when talking to a SPTPS node because n->status.validkey_in is always false in that case. Fix the condition so that the SPTPS status is correctly checked. This prevented recent tinc-1.1 nodes from talking to older, pre-node-ID tinc-1.1 nodes. The regression was introduced in 6056f1c13bb37bf711dff9c25a6eaea99f14d31f. --- diff --git a/src/net_packet.c b/src/net_packet.c index 8313a54f..e169e2cd 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1350,7 +1350,7 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) { if(!n->status.reachable || n == myself) continue; - if((n->status.sptps && !n->sptps.instate) || !n->status.validkey_in) + if(!n->status.validkey_in && !(n->status.sptps && n->sptps.instate)) continue; bool soft = false;