<div dir="ltr">Hi Aymeric<div><br></div><div>Try to use force_rport() after sl_send_reply:</div><div><br></div><div>secf_check_ua();<br>if ($? == -2) {</div><div>  force_rport();<br>  sl_send_reply("200", "OK");<br>  exit;<br>}<br></div><div><br></div><div>For secf_check_sqli_all() the module drops the packet if a sqli is detected in any header but for other functions as secf_check_sqli_ua() it returns a negative code for detection and you choose if you want to drop the packet or not</div><div><br></div><div>Regards</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Dec 2019 at 15:48, Aymeric Moizard <<a href="mailto:amoizard@gmail.com">amoizard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm testing and moving my kamailio script to use the newer secfilter module.<br clear="all"><div><br></div><div>In the past, I was replying "200 Ok" to "friendly scanners"...</div><div><br></div><div>With the newer secfilter module, it looks like I can't send a reply with "sl_send_reply("200", "OK")"</div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>secf_check_ua();</div></div><div><div>if ($? == -2) {</div></div><div><div>  sl_send_reply("200", "OK");</div></div><div><div>  exit;</div></div><div><div>}</div></div></blockquote><div><div><br></div><div>I have read the code of the secfilter, but I was not able to see any specific code to silently discard the SIP request.</div><div><br></div><div>I can see in the documentation about "secf_check_sqli_all", that the SIP message is supposed to be "dropped". I can see "w_check_sqli_all" returns 0 on detection and w_check_ua returns -2 upon detection.</div><div><br></div><div>Are the message discarded because a negative value was returned?</div><div><br></div><div>Would it be doable, using the secfilter, to still reply 200 Ok?</div><div>Regards</div><div>Aymeric</div><div><br></div>-- <br><div dir="ltr"><img src="http://sip.antisip.com/am48.png">Antisip - <a href="http://www.antisip.com" target="_blank">http://www.antisip.com</a><br></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>