Prevent large amounts of UDP probes being sent consecutively.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 18 Dec 2018 16:44:08 +0000 (17:44 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 18 Dec 2018 16:44:08 +0000 (17:44 +0100)
commit017a7fb57655d9b1d706ee78f7e3d0000411b883
tree5a94fa991af5f8bb05c2c55dc2264ef3bf7b3def
parent25a3945e77927c11cae915b7b46fac7ac789013d
Prevent large amounts of UDP probes being sent consecutively.

We cannot reset udp_ping_sent to zero when we receive a valid reply to
an UDP probe, because that would cause a new one to be sent immediately
in try_udp(). Instead, add a bit to node_status_t to keep track of whether we
have a UDP probe that's waiting for a reply.

Thanks to Ronny Nilsson for spotting the source of the problem.
src/net_packet.c
src/node.h