[sr-dev] Via parser does not accept any token as transport
Iñaki Baz Castillo
ibc at aliax.net
Tue Sep 6 14:32:40 CEST 2011
2011/9/2 Iñaki Baz Castillo <ibc at aliax.net>:
> Hi, sip-router Via parser is not RFC compliant as it does not accept
> any token in the transport (even if this does NOT occur in the top
> Via). A real example: kamailio receives a REGISTER like this (removing
> other headers):
>
> REGISTER sip:domain,org SIP/2.0
> Via: SIP/2.0/UDP 1.2.3.4:9090;branch=z9hG4bK3afb3d8e9ea4c4259f9d;rport
> Via: SIP/2.0/WS 1.2.3.4:36638;branch=z9hG4bK5089;received=9.9.9.9;rport=36638
>
> And it fails parsing so also processing the request:
>
> ERROR: <core> [parser/parse_via.c:1677]: ERROR: parse_via: bad char
> <W> on state 122
> ERROR: <core> [parser/parse_via.c:2366]: ERROR: parse_via on:
> <SIP/2.0/UDP 1.2.3.4:9090;branch=z9hG4bK3afb3d8e9ea4c4259f9d;rport
> [...]>
> ERROR: <core> [parser/parse_via.c:2370]: ERROR: parse_via parse error,
> parsed so far:<SIP/2.0/>
> ERROR: <core> [parser/msg_parser.c:139]: ERROR: get_hdr_field: bad via
> INFO: <core> [parser/msg_parser.c:353]: ERROR: bad header field [Via:
> SIP/2.0/WS 1.2.]
>
>
> 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 :)
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-dev
mailing list