Commit 71f7ed3e authored by Olivier Crête's avatar Olivier Crête
Browse files

stun timer: Do 7 retransmissions as recommended

Also reduce the normal timeout to make the test bearable.

This is what RFC 5389 section 7.2.1

Differential Revision: https://phabricator.freedesktop.org/D1056
Maniphest Task: https://phabricator.freedesktop.org/T3339
parent dc1e1b7a
......@@ -438,7 +438,7 @@ static void keepalive (void)
static void test (void (*func) (void), const char *name)
{
alarm (20);
alarm (30);
printf ("%s test... ", name);
func ();
......
......@@ -130,15 +130,18 @@ struct stun_timer_s {
* STUN_TIMER_DEFAULT_TIMEOUT:
*
* The default intial timeout to use for the timer
* RFC recommendds 500, but it's ridiculous, 50ms is known to work in most
* cases as it is also what is used by SIP style VoIP when sending A-Law and
* mu-Law audio, so 200ms should be hyper safe.
*/
#define STUN_TIMER_DEFAULT_TIMEOUT 600
#define STUN_TIMER_DEFAULT_TIMEOUT 200
/**
* STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS:
*
* The default maximum retransmissions allowed before a timer decides to timeout
*/
#define STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS 3
#define STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS 7
/**
* STUN_TIMER_DEFAULT_RELIABLE_TIMEOUT:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment