[OpenSIPS-Devel] [opensips] OpenSIPS accepts broken Contact header, then fails to start (#729)

Saúl Ibarra Corretgé notifications at github.com
Thu Dec 17 16:54:06 CET 2015


(Tested on OpenSIPS 1.11 as of commit 95f5f79)

OpenSIPS accepts a registration with a broken Contact header and saves it in the location table. Example REGISTER:

~~~~
REGISTER sip:sip2sip.info SIP/2.0
Via: SIP/2.0/UDP 127.0.1.1:5060;branch=z9hG4bK-1605-1-0
Max-Forwards: 70
From: "sipp" <sip:saghul at sip2sip.info>;tag=1
To: "sipp" <sip:saghul at sip2sip.info>
Call-ID: reg///1-1605 at 127.0.1.1
CSeq: 7 REGISTER
Contact: <sip:sipp@;rinstance=1234>
Expires: 3600
Content-Length: 0
User-Agent: SIPp
~~~~

After this, if OpenSIPS is restarted, it fails to start with the following log:

~~~~
DBG:core:parse_uri: bad host in uri (error at char ; in state 4) parsed: <sip:sipp@>(XX) /<sip:sipp@;rinstance=1234> (XX)
ERROR:usrloc:compute_next_hop: failed to parse URI of next hop: '                              '
ERROR:usrloc:new_ucontact: failed to resolve next hop
ERROR:usrloc:mem_insert_ucontact: failed to create new contact
ERROR:usrloc:preload_udomain: inserting contact failed
~~~~

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/729
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20151217/9f5e3a40/attachment.htm>


More information about the Devel mailing list