X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=fc24c9a545a6ba72bd5ec0fe505b55580e368ea9;hb=a196e9b0fde1e8a67108eacd51ac663eac5a63ae;hp=4c060453f0b232863a122b8781ced42dd07c8798;hpb=fef29d0193afc7e0a9dc766ef75b79cd4dc6fa37;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index 4c060453..fc24c9a5 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1190,15 +1190,13 @@ static void try_tx_sptps(node_t *n, bool mtu) { node_t *via = (n->via == myself) ? n->nexthop : n->via; - /* If the static relay doesn't support SPTPS, everything goes via TCP anyway. */ + /* If we do have a static relay, try everything with that one instead, if it supports relaying. */ - if((via->options >> 24) < 4) - return; - - /* If we do have a static relay, try everything with that one instead. */ - - if(via != n) + if(via != n) { + if((via->options >> 24) < 4) + return; return try_tx_sptps(via, mtu); + } /* Otherwise, try to establish UDP connectivity. */