Skip to content

trans_layer: set the reply type in send_sf_error_reply() - #660

Merged
hecko merged 4 commits into
masterfrom
ccr-2b9d2486-8mvebr
Nov 25, 2026
Merged

hecko merged 4 commits into
masterfrom
ccr-2b9d2486-8mvebr

Conversation

@hecko

@hecko hecko commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

The sip_msg built for the stateful error reply never had its type set,
so ~sip_msg did not delete the sip_reply it holds and every 400/420/483
rejection from sip_msg2am_request leaked it.

Fixes #654

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_019dXbSvpJc3UDsdCNVCxpZr

The sip_msg built for the stateful error reply never had its type set,
so ~sip_msg did not delete the sip_reply it holds and every 400/420/483
rejection from sip_msg2am_request leaked it.

Fixes #654

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dXbSvpJc3UDsdCNVCxpZr
…rough

parse_cseq() returned as soon as whitespace or a line fold followed the
method token, without calling parse_method(), and the sip_cseq
constructor did not initialise 'method'. A request with a trailing space
in CSeq could then fail the CSeq/request method check. All paths now go
through parse_method(), 'method' is initialised, and the line-fold path
no longer counts the CRLF as part of the method.

In _parse_gen_params() the VP_PNAME_EQU case fell through into
VP_PNAME_EQU_SWS, so 'tag = abc' was parsed with the value '= abc'.

Fixes #655

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dXbSvpJc3UDsdCNVCxpZr
Am100rel::onRequestIn() rejects with the static reply_error(), which
does not go through onReplyTxed(), so an INVITE rejected there with
420/421 left pending_invites incremented and every later re-INVITE in
the dialog was answered with 491.

Fixes #656

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dXbSvpJc3UDsdCNVCxpZr
match_1xx_prack() only compared the RAck method with the stored request
method, so a PRACK whose RAck named PRACK could match an earlier PRACK
transaction and hit the assert in trans_layer::received_msg() in builds
without NDEBUG. RFC 3262 reliable provisionals only exist for INVITE.

Fixes #648

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dXbSvpJc3UDsdCNVCxpZr
Copilot AI balanced review requested due to automatic review settings November 25, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hecko
hecko merged commit a2036f9 into master Nov 25, 2026
26 checks passed
@hecko
hecko deleted the ccr-2b9d2486-8mvebr branch November 25, 2026 06:41
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.

trans_layer: send_sf_error_reply() leaks the sip_reply it allocates

3 participants