Fix direct UDP communciation with pre-relaying 1.1 nodes.

try_tx_sptps() gives up on UDP communication if the recipient doesn't
support relaying. This is too restrictive - we only need the other node
to support relaying if we actually want to relay through them. If the
packet is sent directly, it's fine to send it to an old pre-node-IDs
tinc-1.1 node.
This commit is contained in:
Etienne Dechamps 2015-05-18 21:06:16 +01:00
parent fef29d0193
commit a196e9b0fd

View file

@ -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. */