From c23e50385d9de538af676706596f6508b2ceb01a Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Sun, 8 Mar 2015 14:32:01 +0000 Subject: [PATCH] Fix UDP/MTU discovery in intermediate SPTPS UDP relays. Refactoring commit 81578484dc74fd92f1b01f71f882016f120ab1de seems to have introduced a regression as it moved discovery code away from send_sptps_data_priv() and within send_packet(). The issue is, send_packet() is not called when the node is simply relaying an UDP SPTPS packet: indeed, send_sptps_data_priv() is called directly from handle_incoming_vpn_data() in that case. As a result, try_tx_sptps() is not called in the relaying case, which in practice means that a relay doesn't initiate UDP/MTU discovery with the next relay (unless some other activity compels it to do so). This can result in packets getting sent over TCP instead of UDP from the relay. --- src/net_packet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net_packet.c b/src/net_packet.c index df87e27..8dba325 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1396,6 +1396,7 @@ skip_harder: if(to != myself) { send_sptps_data_priv(to, n, 0, DATA(&pkt), pkt.len - 2 * sizeof(node_id_t)); + try_tx_sptps(n, true); return; } } else { -- 2.25.1