Skip to content

Fix processing peer reflexive ICE candidates with empty checklist#4731

Merged
sauwming merged 1 commit intopjsip:masterfrom
saghul:fix-ice-peer-reflexive
Jan 9, 2026
Merged

Fix processing peer reflexive ICE candidates with empty checklist#4731
sauwming merged 1 commit intopjsip:masterfrom
saghul:fix-ice-peer-reflexive

Conversation

@saghul
Copy link
Copy Markdown
Contributor

@saghul saghul commented Jan 8, 2026

When we learn of a peer-reflexive ICE candidate through STUN binding
requests, try to match the local candidate to the list oof local
candidates rather than the checklist, since it might be empty.

The checklist can be empty when using trickle ICE for example, if remote
cancidates haven't been signalled yet.

When we learn of a peer-reflexive ICE candidate through STUN binding
requests, try to match the local candidate to the list oof local
candidates rather than the checklist, since it might be empty.

The checklist can be empty when using trickle ICE for example, if remote
cancidates haven't been signalled yet.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes a bug in ICE session handling where processing peer-reflexive candidates would fail when the checklist is empty, which commonly occurs in trickle ICE scenarios where remote candidates haven't been signaled yet.

Key Changes:

  • Modified local candidate selection to search the ice->lcand array instead of the checklist (ice->clist.checks)
  • Improved the selection algorithm to explicitly choose the highest priority matching candidate
  • Removed obsolete commented-out code and updated the explanatory comment

@sauwming
Copy link
Copy Markdown
Member

sauwming commented Jan 9, 2026

Looks okay to me, but @nanangizz should be more expert in this area

@sauwming sauwming merged commit 02d0090 into pjsip:master Jan 9, 2026
56 checks passed
wosrediinanatour pushed a commit to wosrediinanatour/pjproject that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants