Skip to content

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

Open
kneliba wants to merge 1 commit into
restsend:mainfrom
kneliba:feat/record-route-addr-override
Open

feat: allow overriding the address advertised in Record-Route#140
kneliba wants to merge 1 commit into
restsend:mainfrom
kneliba:feat/record-route-addr-override

Conversation

@kneliba

@kneliba kneliba commented Aug 12, 2026

Copy link
Copy Markdown

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 takes an Option<SipAddr>
  • None keeps current behaviour.
    • only in-tree caller (examples/proxy.rs) passes None
  • test in test_endpoint.rs covers both paths; build, test and fmt pass

note

  • breaking signature change on a pub fn, happy to add a separate get_record_route_with_addr instead if that's preferred.

Thanks for your time!

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.

1 participant