Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2385,8 +2385,10 @@ void CSteamNetworkingICESession::Think_TestPeerConnectivity()
ICELocalCandidate localCandidates[2];
int nLocalCandidates = 0;

// Host candidate -- always present.
localCandidates[nLocalCandidates++] = { pIntf.get(), {} };
// Host-socket checks to a peer's relay address are dropped by TURN, and
// can hold up the actual relay pairs until the connection times out.
if ( m_nPermittedCandidateTypes & ~k_EICECandidate_Any_Relay )
localCandidates[nLocalCandidates++] = { pIntf.get(), {} };

// Relay candidate -- only when an allocation has succeeded.
if ( pIntf->m_addrTURNServer.IsValid() && !pIntf->m_bRelayFailed )
Expand Down
11 changes: 11 additions & 0 deletions tests/test_p2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,17 @@ def ClientServerExpectedFailureTest( server_extra_args=[], client_extra_args=[],
'relay', 1, _CTR_RELAY,
( _CAND_NAT_TURN, _CAND_NAT_TURN ) ),

# In relay-only mode, host-socket checks to the remote relay are dropped by
# TURN. With multiple interfaces, these host pairs can consume the timeout
# before the relay pairs get checked.
( 'relay-only, multiple symmetric NAT adapters',
( _nat( _SRV_INT, _SRV_GW, 'symmetric' ) + _nat( _SRV_INT2, _SRV_GW2, 'symmetric' )
+ [ '--ice-enable', str(_ICE_ENABLE_RELAY) ] ),
( _nat( _CLI_INT, _CLI_GW, 'symmetric' ) + _nat( _CLI_INT2, _CLI_GW2, 'symmetric' )
+ [ '--ice-enable', str(_ICE_ENABLE_RELAY) ] ),
'relay', 1, _CTR_RELAY,
( {'relay': 2}, {'relay': 2} ) ),

# No-mock tests: run on real network (same host), both implementations.
# No STUN/TURN: a local STUN server can't reveal a real public IP, and a local
# TURN relay allocating loopback addresses is meaningless. Host candidates suffice.
Expand Down