Opened 4 years ago

Closed 4 years ago

#2266 closed enhancement (fixed)

Allow Via header with IPv6 containing []

Reported by: ming Owned by: ming
Priority: normal Milestone: release-2.10
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

When using PJSIP and a SIP packet containing Via "received" with an IPv6 address delimited by [ and ] is received, PJSIP drops such a packet complaining about the [ and ]. No calls can be established.

Via: SIP/2.0/UDP [2001:db8::9:1];received=[2001:db8::9:255];branch=z9hG4bKas3-111"

From RFC 5118 section 4.5:

While it would be beneficial if the same non-terminal
("IPv6reference") was used for both the "sent-by" and "via-received"
production rules, there has not been a consensus in the working group
to that effect. Thus, the best that can be suggested is that
implementations must follow the Robustness Principle [RFC1122] and be
liberal in accepting a "received" parameter with or without the
delimiting [ and ] tokens. When sending a request,
implementations must not put the delimiting [ and ] tokens.

References:
https://issues.asterisk.org/jira/browse/ASTERISK-26955
https://gerrit.asterisk.org/c/asterisk/+/13599/1/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch

Thanks to Sean Bright for the patch.

Change History (1)

comment:1 Changed 4 years ago by ming

  • Owner set to ming
  • Resolution set to fixed
  • Status changed from new to closed

In 6158:

Fixed #2266: Allow Via header with IPv6 containing []

Note: See TracTickets for help on using tickets.