[OpenSIPS-Users] check_address() causes crash
Jeff Pyle
jpyle at fidelityvoice.com
Thu Oct 15 15:38:50 CEST 2009
Irina,
In this case $rd was an IP address, freshly loaded from a
lookup("location"). But, going forward, you're right, this isn't a great
way to do it. Any suggestions on how to get the IP of the where the message
will go if it were to hit a t_relay(), for example?
I'll update and see if it still crashes.
Thanks,
Jeff
On 10/15/09 9:21 AM, "Irina Stanescu" <ironmissy at gmail.com> wrote:
> Hello Jeff,
>
> I managed to get a core dump only when the second parameter of the
> check_address is empty.
> I added a check for that (rev. 6272), so it shouldn't crash anymore.
>
> Also, you can use "$rd" as the second parameter only if the domain name is an
> ip address, otherwise it won't work.
>
> Thanks!
>
> Irina Stanescu
>
> On Wed, Oct 14, 2009 at 10:43 PM, Jeff Pyle <jpyle at fidelityvoice.com> wrote:
>> Hello,
>>
>> I have the following:
>>
>> if (check_address("10", "$rd", "0", "$proto")) {
>> setflag(7);
>> }
>>
>> In many cases, and I can't seem to determine what those cases are, this
>> causes the system to run very slowly for about 30 seconds, and then Opensips
>> exits.
>>
>> I need to know if the source or destination IP addresses fall into one of
>> the blocks included in group 10 of the address table.
>> check_source_address() works great with Irina's fix; this is the destination
>> half. It tanks the system.
>>
>> On the doc page it says:
>> Transport protocol is either "ANY" or any valid transport protocol value:
>> "UDP, "TCP", "TLS", and "SCTP".
>>
>> Is case relevant? Is lowercase just as valid as the uppercase examples?
>>
>>
>>
>> - Jeff
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list