Skip to content

feat: allow overriding the address advertised in Record-Route - #140

Merged
yeoleobun merged 2 commits into
restsend:mainfrom
kneliba:feat/record-route-addr-override
Aug 31, 2026
Merged

feat: allow overriding the address advertised in Record-Route#140
yeoleobun merged 2 commits into
restsend:mainfrom
kneliba:feat/record-route-addr-override

Conversation

@kneliba

@kneliba kneliba commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

get_record_route always builds the URI from the first entry of transport_layer.get_addrs() and a proxy can't advertise anything other than its primary listener. It also can't patch it afterwards either as the RecordRoute is built and returned in one call

why is this a problem?

  • a P-CSCF terminating IPSec listens on an unprotected port and a protected port
  • Record-Route has to advertise the protected one, or in-dialog requests come back to the
    unprotected port and arrive outside the security association, leaking data that should be encrypted

summary of changes

  • get_record_route_with_addr takes an Option<SipAddr>
  • test in test_endpoint.rs covers both paths; build, test and fmt pass

Thanks for your time!

@shenjinti

Copy link
Copy Markdown
Contributor

Thanks
A get_record_route_with_addr is preferred.

@kneliba

kneliba commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks A get_record_route_with_addr is preferred.

Switched to that implementation! @shenjinti ready for re-review :)

@yeoleobun
yeoleobun merged commit 6fab0fc into restsend:main Aug 31, 2026
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.

3 participants