ice
ice copied to clipboard
Selected pair is not accurate
Tested with v0.5.2
One of the tests below revealed that the selected pair (one of the two endpoints) sets does not seem to be correct:
Run.
PION_LOG_TRACE=all go test -v -run TestConnectivityVNet/Symmetric_NATs
One end reports correctly:
ice TRACE: 09:52:48.744710 agent.go:474: Set selected candidate pair: prio 72057593450725376 (local, prio 16777215) relay 1.2.3.4:5495 related 0.0.0.0:5237 <-> prflx 28.1.1.1:49157 related :0 (remote, prio 1862270975)
But the other end says:
ice TRACE: 09:52:48.745427 agent.go:474: Set selected candidate pair: prio 72057593987596287 (local, prio 2130706431) host 10.2.0.1:5300 <-> relay 1.2.3.4:5495 related 0.0.0.0:5237 (remote, prio 16777215)
Local host candidate is not the one succeeded. It should be prflx candidate.
This is probably due to the fact that the ice agent is not checking the mapped-address of received STUN binding response to identify the corresponding local candidate, and incorrectly marking the 'host' candidate as seen connectivity.
This does not affect any connectivity, however, it would be confusing during the debugging or a diagnosis (stats, etc).