diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-06-09 22:22:33 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-04-11 20:04:35 -0400 |
commit | f6f704c5e8d2193bc67ba2b697c77694e1698c43 (patch) | |
tree | 6653b667ccacbdba83ab126f7451d821cf3a2229 /stun/usages/ice.h | |
parent | b0538d8c51f65019867b56a45cf90a70bef38f01 (diff) | |
download | libnice-f6f704c5e8d2193bc67ba2b697c77694e1698c43.tar.gz |
stun timer: fix timeout of the last retransmission
According to RFC 5389, section 7.2.1, a special timeout is applied to
the last retransmission (Rm * RTO), with Rm default value of 16, instead
of (64 * RTO), 2^6 when the number of transmissions Rc is set to 7.
As spotted by Olivier Crete, stun_timer_* is a public API, that cannot
be changed, and the initial delay (RTO) is not preserved in the
stun_timer_s struct. So we use a hack that implicitely guess Rm from the
number of transmissions Rc, by generalizing the default value of the
spec for Rm and Rc to other values of Rc passed in stun_timer_start(
According to the spec, with the default value of Rc=7, the last delay
should be (64 * RTO), and it is instead (16 * RTO). So the last delay
can be computed by dividing the penultimate delay by two, instead of
multiplying it by two.
Differential Revision: https://phabricator.freedesktop.org/D1108
Diffstat (limited to 'stun/usages/ice.h')
0 files changed, 0 insertions, 0 deletions