<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi,<br>
<br>
Well, if the "message" got to the script level, it means is
"looks" like a SIP message - to reach the script, the message must
have a SIP valid first line and Top most VIA.<br>
<br>
So, if your "bogus" messages do not have anything to do with SIP,
considering actions at script level is a non sense as it is too
late. What you can do is to rely on the size of the package in
order to drop it (by default, OpenSIPS drops any UDP packet
shorter than 20 bytes - see MIN_UDP_PACKET in config.h). You can
change that value to match your needs. And recompile.<br>
<br>
IF the incoming traffic looks like SIP packages (and it lands in
your script), you should use the sipmsg_validate() to get ready of
it asap. It is not about processing, it is more about avoid
polluting the logs with errors :)<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 28.06.2016 18:06, Owais Ahmad wrote:<br>
</div>
<blockquote
cite="mid:CAArAGKmxBv1L-vZ9Vs1n3nHbw-hWYJQ9fa_eUs7sWsqjjO0o9A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:trebuchet
ms,sans-serif">Thats not the case Alex. But I am expecting a
large number of UDP messages arriving on the same port as my
udp listening socket.<br>
</div>
<div class="gmail_default" style="font-family:trebuchet
ms,sans-serif">Just want to be sure there is no wasteful work
done parsing such packets.<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 28, 2016 at 8:04 PM, Alex
Balashov <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Are you
under the impression that these consume a significant amount
of OpenSIPS resources? If so, how did you arrive at that
conclusion?<span class=""><br>
<br>
On 06/28/2016 11:02 AM, Owais Ahmad wrote:<br>
</span>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">
Hello,<br>
<br>
I am getting UDP (non-SIP) packets on opensips listening
port. How can I<br>
drop those packets to ensure it only consumes the least
opensips resources.<br>
<br>
I do have mechanisms to prevent this on the firewall but
just want to be<br>
sure that if such a network packet does reach the
server, opensips<br>
doesn't end up parsing it assuming its SIP.<br>
<br>
I want to do this without using: sipmsg_validate<br>
</span>
<<a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/2.1.x/sipmsgops.html#id294336"
rel="noreferrer" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/sipmsgops.html#id294336</a>><br>
<<a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/2.1.x/sipmsgops.html#id294336"
rel="noreferrer" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/sipmsgops.html#id294336</a>><br>
<br>
Regards,<br>
Owais<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
1447 Peachtree Street NE, Suite 700<br>
Atlanta, GA 30309<br>
United States<br>
<br>
Tel: <a moz-do-not-send="true" href="tel:%2B1-800-250-5920"
value="+18002505920" target="_blank">+1-800-250-5920</a>
(toll-free) / <a moz-do-not-send="true"
href="tel:%2B1-678-954-0671" value="+16789540671"
target="_blank">+1-678-954-0671</a> (direct)<br>
Web: <a moz-do-not-send="true"
href="http://www.evaristesys.com/" rel="noreferrer"
target="_blank">http://www.evaristesys.com/</a>, <a
moz-do-not-send="true" href="http://www.csrpswitch.com/"
rel="noreferrer" target="_blank"><a class="moz-txt-link-freetext" href="http://www.csrpswitch.com/">http://www.csrpswitch.com/</a></a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>