henningw left a comment (kamailio/kamailio#4643)

> I haven't checked the PR yet, just a comment on specs: Via branch is 
> mandatory in a RFC3261 implementation, but that RFC also requires backward 
> compatibility with RFC2543, where it is not required. So this check must not 
> be done implicitly, maybe a new test option (or function) for sanity module.

The RFC actually specify that its mandatory in Section 8.1.1.7
```
   When the UAC creates a request, it MUST insert a Via into that
   request.  The protocol name and protocol version in the header field
   MUST be SIP and 2.0, respectively.  The Via header field value MUST
   contain a branch parameter.  This parameter is used to identify the
   transaction created by that request.  This parameter is used by both
   the client and the server.
```
The grammar defines it as not mandatory, correct. Are you sure we need to care 
still about RFC 2543? I have never seen any device that uses SIP 1.0 in almost 
20 years. 

Some places in the code assume that its there without checking. We observed a 
crash due to a malformed message.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4643#issuecomment-4056052911
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4643/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to