[sr-dev] [tracker] Task opened: Parser doesn't eliminate linebreaks when logging bad packets, breaks syslog

sip-router bugtracker at sip-router.org
Thu Jul 25 15:55:02 CEST 2013


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Sebastian Damm (sdamm) 

Attached to Project - sip-router
Summary - Parser doesn't eliminate linebreaks when logging bad packets, breaks syslog
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To - 
Operating System - Linux
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - When sending broken packets to a Kamailio 4.0, the parser logs the complete packet. In Kamailio 3.1 it eliminated line breaks before logging, so that one line with the the packet was written to the correct logfile. In Kamailio 4.0 only the first line of the broken packet is written to the logfile, the rest of the packet is written to the main syslog file (probably since no syslog facility is specified). 

Comparison:
Kamailio 3.1

kamailio.log
Jul 25 06:26:00 hostname /usr/sbin/kamailio[5452]: ERROR: <core> [parser/msg_parser.c:714]: ERROR: parse_msg: message=<REGISTER sip:Dach GXP2100 SIP/2.0  Via: SIP/2.0/UDP 192.168.0.209:5468;branch=z9hG4bK1668961676;rport  From: <sip:1234567e20 at Dach GXP2100>;tag=1685573665  To: <sip:1234567e20 at Dach GXP2100>  Call-ID: 1720384019-5468-1 at BJC.BGI.A.CAJ  CSeq: 28699 REGISTER  Contact: <sip:1234567e20 at 192.168.0.209:5468>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B823AFF6E>"  X-Grandstream-PBX: true  Max-Forwards: 70  User-Agent: Grandstream GXP2100 1.0.1.110  Supported: path  Expires: 600  Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE  Content-Length: 0    >

Kamailio 4.0

kamailio.log
Jul 25 06:26:00 hostname /usr/sbin/kamailio[13036]: ERROR: <core> [parser/msg_parser.c:705]: parse_msg(): ERROR: parse_msg: message=<REGISTER sip:Dach GXP2100 SIP/2.0

syslog
Jul 25 06:26:00 hostname Via: SIP/2.0/UDP 192.168.0.209:5468;branch=z9hG4bK1668961676;rport
Jul 25 06:26:00 hostname From: <sip:1234567e20 at Dach GXP2100>;tag=1685573665
Jul 25 06:26:00 hostname To: <sip:1234567e20 at Dach GXP2100>
Jul 25 06:26:00 hostname Call-ID: 1720384019-5468-1 at BJC.BGI.A.CAJ
Jul 25 06:26:00 hostname CSeq: 28699 REGISTER
Jul 25 06:26:00 hostname Contact: <sip:1234567e20 at 192.168.0.209:5468>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B823AFF6E>"
Jul 25 06:26:00 hostname X-Grandstream-PBX: true
Jul 25 06:26:00 hostname Max-Forwards: 70
Jul 25 06:26:00 hostname User-Agent: Grandstream GXP2100 1.0.1.110
Jul 25 06:26:00 hostname Supported: path
Jul 25 06:26:00 hostname Expires: 600
Jul 25 06:26:00 hostname Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Jul 25 06:26:00 hostname Content-Length: 0
Jul 25 06:26:00 hostname >

How to reproduce: 
Configure Kamailio to log into a syslog facility, then send a broken packet to that kamailio.

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=328

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list