[sr-dev] Via parser does not accept any token as transport

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 13 22:08:12 CEST 2011


Hello,

On 9/13/11 9:02 PM, Iñaki Baz Castillo wrote:
> 2011/9/6 Iñaki Baz Castillo<ibc at aliax.net>:
>>> Please, make it possible for the Via transport to contain an unknown
>>> token, at least when it does NOT occur in the top Via header. Why
>>> should Kamailio care about the second Via transport field?
>> Hi, any comment about this report please? I've tryed to figure how to
>> change the Via transport parser in order to allow any token (as
>> RFC3261 states) but I've got lost within the hyper-optimized parser :)
> Hi, some comment please? :(

you started the discussion when many of us were partying for 10 years 
celebration :-) so it got lost -- reminders are recommended always.

There is no real good reason why not accepting unknown transport 
protocols non-top Vias. The limitation is coming from implementation of 
the parser, but should be relaxed.

The best would be to introduce PROTO_OTHER in the enum of protocols 
(ip_addr.h, enum sip_protos) and in case this type is encountered, read 
the string value of the protocol.

Via parser is using quite a lot of states, so if you look to update it, 
when it gets to the state where the transport (proto) part starts, if 
does not match UDP, TCP, TLS or SCTP, then set vb->proto=PROTO_OTHER and 
start and length of the token in vb->transport. Should not be very 
complex to enhance once you get into via parser states.

I may fix it before 3.2.0 is out if you are not doing it meanwhile, but 
cannot give you a timeline for it right now.

Cheers,
Daniel

>
> This issue is breaking a new SIP transport we have proposed:
>
>    http://tools.ietf.org/html/draft-ibc-rtcweb-sip-websocket-00
>
> Thanks a lot.
>
> PS: I will try to modify the Via parser so it allows any token in the
> Via transport field.
>

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-dev mailing list