Skip to content

Stabilize ICE-lite priorities like libwebrtc - #7

Merged
cnderrauber merged 2 commits into
warp-4.4.8from
migration_test
Nov 9, 2026
Merged

cnderrauber merged 2 commits into
warp-4.4.8from
migration_test

Conversation

@cnderrauber

Copy link
Copy Markdown
Collaborator

cnderrauber and others added 2 commits November 9, 2026 16:02
History:
PR pion#959 let ICE-lite agents pick the best pair locally without sending
checks. All lite host candidates had the same priority, so with
several candidates the two sides could pick different pairs and fail
to connect. pion#968 fixed that by stepping each new lite candidate down
from the default until its priority was unique. That made priorities
depend on gather order: the same address could get a different
priority on another node, or depending on whether the node was
single- or dual-stack.

The main problem is that Pion doesn't have local preference like
libwebrtc, instead of doing other hacks this adds:
`(counter << 8) | address precedence`. The low byte is the RFC 6724
precedence of the address (IPv6 40, IPv4 30, and so on), so address
families never collide. The counter drops only to separate candidates
of the same family. A candidate's priority no longer depends on gather
order or on whether the agent is single- or dual-stack.

Unlike libwebrtc, the high byte is not a network adapter preference,
since Pion has no adapter types.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cnderrauber
cnderrauber requested a review from a team November 9, 2026 08:07
@cnderrauber
cnderrauber merged commit 48d1e81 into warp-4.4.8 Nov 9, 2026
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants