Skip to content
Snippets Groups Projects
Commit ae543227 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

ice: increase stun RTO

This patch increases STUN RTO to 500ms.
This gives a better total time to check all ICE connections
(during negotiation). The previous RTO let less than 8s, too short
for ICE messages exchange over DHT.

Change-Id: I8088abdc4d2306931adb3fdc19edda290479ab6f
Tuleap: #614
parent fc613326
Branches
Tags
No related merge requests found
...@@ -875,6 +875,12 @@ IceTransportFactory::IceTransportFactory() ...@@ -875,6 +875,12 @@ IceTransportFactory::IceTransportFactory()
pj_ice_strans_cfg_default(&ice_cfg_); pj_ice_strans_cfg_default(&ice_cfg_);
ice_cfg_.stun_cfg.pf = &cp_.factory; ice_cfg_.stun_cfg.pf = &cp_.factory;
// v2.4.5 of PJNATH has a default of 100ms but RFC 5389 since version 14 requires
// a minimum of 500ms on fixed-line links. Our usual case is wireless links.
// This solves too long ICE exchange by DHT.
// Using 500ms with default PJ_STUN_MAX_TRANSMIT_COUNT (7) gives around 31s before timeout.
ice_cfg_.stun_cfg.rto_msec = 500;
ice_cfg_.af = pj_AF_INET(); ice_cfg_.af = pj_AF_INET();
ice_cfg_.stun.cfg.max_pkt_size = 8192; ice_cfg_.stun.cfg.max_pkt_size = 8192;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment