Hi I’ve noticed a large amount of UDP probe packets in my system. The default udp_discovery_interval is very low so I tried to increase it with configs UDPDiscoveryInterval UDPDiscoveryKeepaliveInterval However, this doesn’t work! Every second a probe is sent no matter what. After some digging in the sources I found that the interval timer is cleared in udp_probe_h() which causes try_udp() to send probes again and again... Removing the timer clear made config UDPDiscoveryInterval to start work, but a side effect seems to be incorrect rtt calculations in tinc. Is this a bug or a known issue? Version used is 1.1pre17. Thanks /Ronny Nilsson
On Sun, Dec 16, 2018 at 11:41:04PM +0100, Ronny Nilsson wrote:> I’ve noticed a large amount of UDP probe packets in my system. The default > udp_discovery_interval > is very low so I tried to increase it with configs > UDPDiscoveryInterval > UDPDiscoveryKeepaliveInterval > However, this doesn’t work! Every second a probe is sent no matter what. > > After some digging in the sources I found that the interval timer is cleared > in > udp_probe_h() > which causes > try_udp() > to send probes again and again... Removing the timer clear made config > UDPDiscoveryInterval to start work, but a side effect seems to be incorrect > rtt calculations in tinc. Is this a bug or a known issue? Version used is > 1.1pre17.It is a bug. The timer udp_ping_sent should not have been zeroed, instead we need to keep track of whether we have a probe in flight in another place. I've just committed a patch to the 1.1 branch that hopefully solves this issue. Please try it out if possible, and let us know whether this fixes the issue for you! -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20181218/980c85c4/attachment.sig>
Hi Thanks for the help. I've started to test it. Those every second probes are gone. However, there might still be something fishy with the UDP probes, but I'm uncertain. I can notice these debug messages somewhat too often: Sending type 2 probe reply length 18 to xxx Sending packet from server (MYSELF port 655) to xxx The "server" keeps resending UDP replies to the "client" again and again, without the client having any probe in progress! Verified with tcpdump as well. Is this by design or another bug? And a minor cosmetic issue in the patch is the left over comment // Reset the UDP ping timer. It should likely be removed entirely. Thanks! /Ronny ------------------------------------------> On Sun, Dec 16, 2018 at 11:41:04PM +0100, Ronny Nilsson wrote: > > I’ve noticed a large amount of UDP probe packets in my system. The > > default udp_discovery_interval > > is very low so I tried to increase it with configs > > UDPDiscoveryInterval > > UDPDiscoveryKeepaliveInterval > > However, this doesn’t work! Every second a probe is sent no matter what. > > > > After some digging in the sources I found that the interval timer is > > cleared in > > udp_probe_h() > > which causes > > try_udp() > > to send probes again and again... Removing the timer clear made config > > UDPDiscoveryInterval to start work, but a side effect seems to be > > incorrect rtt calculations in tinc. Is this a bug or a known issue? > > Version used is 1.1pre17. > > It is a bug. The timer udp_ping_sent should not have been zeroed, > instead we need to keep track of whether we have a probe in flight in > another place. I've just committed a patch to the 1.1 branch that > hopefully solves this issue. Please try it out if possible, and let us > know whether this fixes the issue for you!