THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#465 - To tag parsing bug
User who did this - Alekzander Spiridonov (alekz)
----------
Daniel, at the moment there are 2 issues in the code actually: the first one is the subj and the second is actually the local reply length calculation. When parsing request (with null to tag value) code points to_tag.s right after "tag=" but sets to_tag.len=0.
When calc'ing reply length in case to_tag.len==0 code expects to add both a value and "tag=" part. And that's what is done wrong since further in the code only to_tag.s is checked and if exists new_tag value is added right after it.
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=465#comment1613
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.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#465 - To tag parsing bug
User who did this - Daniel-Constantin Mierla (miconda)
----------
The next change is a bit unclear for me:
<code>
- if (to_tag.len )
+ if ( to_tag.len || to_tag.s )
len+=new_tag->len-to_tag.len;
</code>
It is about computing the length of the response, but here it is not adding the new tag value length. However, in your description, you show that the tag value was added. My guess it that the patch could end up in a buffer overflow. At the first sight I would say that this change is not necessary, only the part on the parser.
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=465#comment1612
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.
Hi Daniel,
i'm running a build from master
Process:: ID=51 PID=7478 Type=slow timer
Process:: ID=52 PID=7479 Type=timer
memory from top
7479 kamailio 20 0 1224m *72m 5464 *S 0.3 1.9 0:00.68 kamailio
7478 kamailio 20 0 1224m *80m 13m *S 0.0 2.1 0:00.71 kamailio
package and shared memory and constantly increasing on these processes when
i use the dbtext from master without the proposed patch.
Module: sip-router
Branch: master
Commit: b10359955348294d81efd9ebb80f68d81cf72e54
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b103599…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Sep 8 23:04:35 2014 +0200
usrloc: documented expires_type parameter
---
modules/usrloc/README | 22 +++++++++++++++++++++-
modules/usrloc/doc/usrloc_admin.xml | 27 ++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/modules/usrloc/README b/modules/usrloc/README
index 0e479fa..68fac27 100644
--- a/modules/usrloc/README
+++ b/modules/usrloc/README
@@ -69,6 +69,7 @@ Bogdan-Andrei Iancu
3.31. xavp_contact (string)
3.32. db_ops_ruid (int)
3.33. handle_lost_tcp (int)
+ 3.34. expires_type (int)
4. Functions
5. MI Commands
@@ -159,6 +160,7 @@ Bogdan-Andrei Iancu
1.31. Set xavp_contact parameter
1.32. Set db_ops_ruid parameter
1.33. Set handle_lost_tcp parameter
+ 1.34. Set expires_type parameter
Chapter 1. Admin Guide
@@ -208,6 +210,7 @@ Chapter 1. Admin Guide
3.31. xavp_contact (string)
3.32. db_ops_ruid (int)
3.33. handle_lost_tcp (int)
+ 3.34. expires_type (int)
4. Functions
5. MI Commands
@@ -275,7 +278,8 @@ Chapter 1. Admin Guide
retransmissions in this case.
To find out how to control/select the contact maching algorithm, please
- see the module parameter matching_mode - ???.
+ see the module parameter matching_mode - Section 3.23, "matching_mode
+ (integer)".
2. Dependencies
@@ -328,6 +332,7 @@ Chapter 1. Admin Guide
3.31. xavp_contact (string)
3.32. db_ops_ruid (int)
3.33. handle_lost_tcp (int)
+ 3.34. expires_type (int)
3.1. nat_bflag (integer)
@@ -779,6 +784,21 @@ modparam("usrloc", "db_ops_ruid", 1)
modparam("usrloc", "handle_lost_tcp", 1)
...
+3.34. expires_type (int)
+
+ If set to 1, Kamailio expects to deal with BIGINT type on database
+ columns for expires and last modified values. It allows to handle
+ better the daylight time adjustmens. If set to 0, those columns are
+ expected to be on default type 'DATETIME'. When it is 1, the database
+ columns types have to be changed manually to 'BIGINT'.
+
+ Default value is "0".
+
+ Example 1.34. Set expires_type parameter
+...
+modparam("usrloc", "expires_type", 1)
+...
+
4. Functions
There are no exported functions that could be used in scripts.
diff --git a/modules/usrloc/doc/usrloc_admin.xml b/modules/usrloc/doc/usrloc_admin.xml
index 1de1c31..b4f68a0 100644
--- a/modules/usrloc/doc/usrloc_admin.xml
+++ b/modules/usrloc/doc/usrloc_admin.xml
@@ -67,7 +67,7 @@
</itemizedlist>
<para>
To find out how to control/select the contact maching algorithm, please see the
- module parameter matching_mode - <xref linkend="matching-mode"/>.
+ module parameter matching_mode - <xref linkend="usrloc.p.matching_mode"/>.
</para>
</section>
</section>
@@ -896,6 +896,31 @@ modparam("usrloc", "handle_lost_tcp", 1)
</example>
</section>
+ <section id="usrloc.p.expires_type">
+ <title><varname>expires_type</varname> (int)</title>
+ <para>
+ If set to 1, &kamailio; expects to deal with BIGINT type on
+ database columns for expires and last modified values. It
+ allows to handle better the daylight time adjustmens. If set
+ to 0, those columns are expected to be on default type
+ 'DATETIME'. When it is 1, the database columns types have
+ to be changed manually to 'BIGINT'.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>0</quote>.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>expires_type</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("usrloc", "expires_type", 1)
+...
+</programlisting>
+ </example>
+ </section>
+
</section>
<section>