X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=40cb2bac1443783a0803e4f21e277ea252e0398f;hb=9bb230f30f665779eb89dcce077a15360ec50be1;hp=8dba3258d989b1c159eb9307390f3ad5896c1ec8;hpb=6568cffd52d4803effaf52a9bb9c98d69cf7922a;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index 8dba3258..40cb2bac 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1394,6 +1394,17 @@ skip_harder: return; } + /* The packet is supposed to come from the originator or its static relay + (i.e. with no dynamic relays in between). + If it did not, "help" the static relay by sending it UDP info. + Note that we only do this if we're the destination or the static relay; + otherwise every hop would initiate its own UDP info message, resulting in elevated chatter. */ + + if(n != from->via && to->via == myself) + send_udp_info(myself, from); + + /* If we're not the final recipient, relay the packet. */ + if(to != myself) { send_sptps_data_priv(to, n, 0, DATA(&pkt), pkt.len - 2 * sizeof(node_id_t)); try_tx_sptps(n, true);