Skip to content

Stabilize ICE-lite priorities across address families - #1059

Closed
cnderrauber wants to merge 1 commit into
mainfrom
stabilize_icelite_priority
Closed

cnderrauber wants to merge 1 commit into
mainfrom
stabilize_icelite_priority

Conversation

@cnderrauber

Copy link
Copy Markdown
Member

Description

Livekit regress on migration after updates to v4.4.8 which contains the change #968. When the client migrate to another node by ice-restart, the new node could generate a lower priority candidate than the selected one on old node, though they are the same family. Since the old selected candidate is still alive in migration case, causing Chrome to prune the new target and leave migration waiting for ICE nomination.

@davidzhao Found the root case and fix it by reserve odd local-preference slots for IPv6 and even slots for IPv4. This keeps each family's priorities stable across gather order and single/dual-stack nodes while retaining unique priorities

Keeps each family's priorities stable across
gather order and single/dual-stack nodes
while retaining unique priorities.

@JoTurk JoTurk left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this behavior is described in the spec, in fact we should prune previous state, this fix feels like a work around hack:

An ICE agent MAY restart ICE for existing data streams. An ICE
restart causes all previous states of the data streams, excluding the
roles of the agents, to be flushed.

what we should do is that we should stabilize our priority algorithm like libwebrtc, the original PR fixed another regression made by #959 which made connections fail if a pair has multiple lite candidates.

@JoTurk

JoTurk commented Nov 9, 2026

Copy link
Copy Markdown
Member

what we should do is that we should stabilize our priority algorithm like libwebrtc,

I'll open a PR to do that!

@JoTurk

JoTurk commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

@cnderrauber please check #1060

@cnderrauber cnderrauber closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants