X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=40cb2bac1443783a0803e4f21e277ea252e0398f;hb=9bb230f30f665779eb89dcce077a15360ec50be1;hp=df87e27f4409b4210643ceab563bc54c367dea92;hpb=0f8e2cc78cafe47a087d3fc9b480551b841aeb30;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index df87e27f..40cb2bac 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1394,8 +1394,20 @@ 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); return; } } else {