[OpenSIPS-Users] How do i drop "bad packets"

Liviu Chircu liviu at opensips.org
Wed Sep 24 18:53:27 CEST 2014


Could you dump a SIP request that's generating parsing errors? Maybe we 
can find a better alternative than doing:

setdebug(-2);
if (!sipmsg_validate()) {
     send_reply("400", "Bad request");
     exit;
}
setdebug();

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 09/24/2014 07:33 PM, Dovid Bender wrote:
>
> Hi,
>
> We are getting a lot of the errors below. From looking around it seems 
> they are "garbage packets" 
> (http://stackoverflow.com/questions/19312353/drop-a-packet-before-the-start-of-routing-call-opensips). 
> How do I figure out which packets are causing this so I can silently 
> discard them?
>
> Regards,
>
> Dovid
>
> [root at ServerA ~]# tail -f /var/log/messages | grep -v snmp
>
> Sep 24 12:13:20 ServerA /sbin/opensips[10032]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:20 ServerA /sbin/opensips[10032]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:21 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10004]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10004]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10009]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:23 ServerA /sbin/opensips[10009]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:24 ServerA /sbin/opensips[10008]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:24 ServerA /sbin/opensips[10008]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:24 ServerA /sbin/opensips[10011]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:24 ServerA /sbin/opensips[10011]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:25 ServerA /sbin/opensips[10011]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:25 ServerA /sbin/opensips[10011]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:25 ServerA /sbin/opensips[10006]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:25 ServerA /sbin/opensips[10006]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10007]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10007]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10012]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10012]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10009]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:26 ServerA /sbin/opensips[10009]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10008]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10008]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: 
> ERROR:core:warning_builder: buffer size exceeded
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10006]: 
> WARNING:core:build_res_buf_from_sip_req: warning skipped -- too big
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10009]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:27 ServerA /sbin/opensips[10009]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10009]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10009]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10006]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10006]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10012]: 
> ERROR:core:warning_builder: buffer size exceeded
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10012]: 
> WARNING:core:build_res_buf_from_sip_req: warning skipped -- too big
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10011]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10011]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10010]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:28 ServerA /sbin/opensips[10010]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10011]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10011]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10012]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10012]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10008]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10008]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10012]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:29 ServerA /sbin/opensips[10012]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10012]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10012]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10011]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10011]: ERROR:core:receive_msg: 
> parse_msg failed
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10005]: ERROR:core:parse_msg: 
> message=<>
>
> Sep 24 12:13:30 ServerA /sbin/opensips[10005]: ERROR:core:receive_msg: 
> parse_msg failed
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140924/3ce9d264/attachment-0001.htm>


More information about the Users mailing list