[SR-Users] Via header, branch parameter and syn_branch

Richard Brady rnbrady at gmail.com
Thu May 23 12:12:20 CEST 2013


Hi folks

The syn_branch global parameter results in the use of a "synonym"
branch parameter in the Via header for statelessly forwarded requests
as a performance optimisation.

This was originally done by setting branch=0 which, while not strictly
compliant with 3261 (8.1.1.7 and 16.6 item 8), would not cause any
problems with a downstream proxy or UA compliant to either 3261 or
2543 since it does not contain the cookie and is therefore
self-evidently not guaranteed to be unique.

Then a patch was added (commit ebb3b08) to change it from branch=0 to
branch=z9hG4bKcydzigwkX which includes the cookie, thus declaring
itself to be unique when it clearly is not.

This takes the optimisation too far as it deliberately misleads
downstream proxies with regard to the uniqueness of the parameter and
breaks the mechanism in 17.2.3 for identifying unreliable (non-unique)
branch parameters for transaction matching which should then fall back
to header inspection but does not. The result is that unrelated
requests can be identified as duplicates of each other.

Also note 3261 section 16.11 on Stateless Proxy behaviour: "The
requirement for unique branch IDs across space and time applies to
stateless proxies as well."

Has the commit above introduced a bug and should it be reverted?

And should the next major release have a default of syn_branch=0?
Since with syn_branch=1 the branch=0 version has been known to cause
interop issues in the past (see below) and I can confirm the
branch=z9hG4bKcydzigwkX version causes interop issues in the present.

Regards,
Richard

See also these related threads:

[SR-Users] Via header branch parameter in ACK message not unique
http://lists.sip-router.org/pipermail/sr-users/2011-December/071207.html

[SR-Users] "branch" tag in the "Via" header of the ACK message for the re-INVITE
http://lists.kamailio.org/pipermail/sr-users/2012-November/075560.html

[Serusers] branch parameter
http://lists.sip-router.org/pipermail/sr-users/2007-February/060147.html

[SR-Users] about syn_branch
http://lists.sip-router.org/pipermail/sr-users/2011-March/067732.html

[SR-Users] Via branch parameter in end2end ACK
http://lists.sip-router.org/pipermail/sr-users/2011-May/068627.html

[SR-Users] Broken Via/reply-matching for natping OPTION
http://lists.sip-router.org/pipermail/sr-users/2011-April/068340.html

[Serusers] ACK message Via field branch=0 problem
http://lists.sip-router.org/pipermail/sr-users/2004-July/037731.html



More information about the sr-users mailing list