Skip to content

ice: avoid forced ICE in answers to non-ICE offers (#2161) - #2207

Open
darwvin-dev wants to merge 4 commits into
sipwise:masterfrom
darwvin-dev:fix/ice-force-nonice-answer-2161
Open

darwvin-dev wants to merge 4 commits into
sipwise:masterfrom
darwvin-dev:fix/ice-force-nonice-answer-2161

Conversation

@darwvin-dev

Copy link
Copy Markdown
Contributor

Fork-local draft for upstream #2161.

Change

  • Do not retain forced ICE on an answer to a non-ICE offer when no local ICE agent was established; preserve valid negotiated ICE when RTPengine deliberately offered it.
  • Clarify answer negotiation constraints in docs/ng_control_protocol.md.
  • Add t/auto-daemon-tests-ice-force-answer.pl and wire it into t/Makefile (daemon-tests-ice-force-answer and the aggregated daemon-tests). The test covers forced ICE offer, a non-ICE answer with ICE=force, and bidirectional RTP.

Required validation

  • Execute the new suite and compare precise SDP generated on each leg.
  • Demonstrate regression (old master fails, patched branch passes), or revise the proposed fix if the test already passes before patch.
  • Test real ICE peer acceptance, ICE=default, and the original report's deployment conditions.
  • Daemon build and overall suite.

Draft only. Issue #2161 is not yet proven to be caused by this exact condition.


Upstream submission notes

This is a draft, carried from contributor fork PR darwvin-dev/rtpengine#6.
Unfinished validation: Please refer to the outstanding build, runtime, regression and/or integration tests above. No claim is made that these checks passed. Review for compatibility and completeness before marking ready.
The source branch is behind current upstream master and may require reconciliation before merging.

@darwvin-dev
darwvin-dev marked this pull request as ready for review October 17, 2026 12:59
@rfuchs

rfuchs commented Oct 21, 2026

Copy link
Copy Markdown
Member

Included tests are broken

not ok 6 - forced ICE offer, plain RTP peer - output 'offer' SDP
#   Failed test 'forced ICE offer, plain RTP peer - output 'offer' SDP'
#   at ../perl/NGCP/Rtpengine/AutoTest.pm line 181.
#                   'v=0
# o=- 1545997027 1 IN IP4 198.51.100.1
# s=tester
# t=0 0
# m=audio 36026 RTP/AVP 0
# c=IN IP4 203.0.113.1
# a=rtpmap:0 PCMU/8000
# a=sendrecv
# a=rtcp:36027
# a=ice-ufrag:XP482loQ
# a=ice-pwd:kq41dpMBgr9qxuHIfskP2Llfyz
# a=candidate:NYDLpP0Zm3qiOWBk 1 UDP 2130706431 203.0.113.1 36026 typ host
# a=candidate:aEab6rtkrxkI7LSL 1 UDP 2130706175 2001:db8:4321::1 30502 typ host
# a=candidate:NYDLpP0Zm3qiOWBk 2 UDP 2130706430 203.0.113.1 36027 typ host
# a=candidate:aEab6rtkrxkI7LSL 2 UDP 2130706174 2001:db8:4321::1 30503 typ host
# '
#     doesn't match '(?^s:^v\=0\
# o\=\-\ 1545997027\ 1\ IN\ IP4\ 198\.51\.100\.1\
# s\=tester\
# t\=0\ 0\
# m\=audio\ (\d{1,5})\ RTP\/AVP\ 0\
# c\=IN\ IP4\ 203\.0\.113\.1\
# a\=rtpmap\:0\ PCMU\/8000\
# a\=sendrecv\
# a\=rtcp\:(\d{1,5})\
# a\=ice\-ufrag\:([0-9a-zA-Z]{8})\
# a\=ice\-pwd\:([0-9a-zA-Z]{26})\
# a\=candidate\:([0-9a-zA-Z]{16})\ 1\ UDP\ 2130706431\ 203\.0\.113\.1\ (\d{1,5})\ typ\ host\
# a\=candidate\:([0-9a-zA-Z]{16})\ 1\ UDP\ 2130706175\ 2001\:db8\:4321\:\:1\ (\d{1,5})\ typ\ host\
# $)'

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.

2 participants