[Pkg-voip-commits] r9996 - in /kamailio/trunk/debian: ./ patches/ patches/upstream/
maniac-guest at alioth.debian.org
maniac-guest at alioth.debian.org
Mon Oct 8 07:41:15 UTC 2012
Author: maniac-guest
Date: Mon Oct 8 07:41:14 2012
New Revision: 9996
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9996
Log:
upstream fixes
Added:
kamailio/trunk/debian/patches/upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch
kamailio/trunk/debian/patches/upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch
kamailio/trunk/debian/patches/upstream/0058-tcp-fix-_wbufq_insert-bug.patch
Modified:
kamailio/trunk/debian/changelog
kamailio/trunk/debian/patches/series
Modified: kamailio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/changelog?rev=9996&op=diff
==============================================================================
--- kamailio/trunk/debian/changelog (original)
+++ kamailio/trunk/debian/changelog Mon Oct 8 07:41:14 2012
@@ -12,7 +12,7 @@
+ remove call to dpkg-buildflags
+ do not apply hardening_flags.patch
- -- Victor Seva <linuxmaniac at torreviejawireless.org> Wed, 12 Sep 2012 08:34:08 +0200
+ -- Victor Seva <linuxmaniac at torreviejawireless.org> Mon, 08 Oct 2012 09:39:51 +0200
kamailio (3.3.0-1) unstable; urgency=low
Modified: kamailio/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/series?rev=9996&op=diff
==============================================================================
--- kamailio/trunk/debian/patches/series (original)
+++ kamailio/trunk/debian/patches/series Mon Oct 8 07:41:14 2012
@@ -43,6 +43,9 @@
upstream/0053-modules_k-usrloc-modified-syslog-messages-on-bad-and.patch
upstream/0054-modules_k-rls-Fixed-segmentation-fault-in-RLS-when-a.patch
upstream/0055-modules_k-rls-Fixed-race-condition-on-multi-server-s.patch
+upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch
+upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch
+upstream/0058-tcp-fix-_wbufq_insert-bug.patch
no_lib64_on_64_bits.patch
no_INSTALL_file.patch
fix_export.patch
Added: kamailio/trunk/debian/patches/upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch?rev=9996&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0056-modules-ctl-remove-limitation-on-number-of-message-c.patch Mon Oct 8 07:41:14 2012
@@ -1,0 +1,97 @@
+From 3d195f2675569954a1f74128508db07cbc604ed9 Mon Sep 17 00:00:00 2001
+From: Richard Fuchs <rfuchs at sipwise.com>
+Date: Thu, 20 Sep 2012 12:08:03 -0400
+Subject: [PATCH] modules/ctl: remove limitation on number of message chunks
+
+binrpc uses an iovec to send out replies, which is limited in size and so
+severely limits the number of elements that can be returned. This patch adds
+a callback function to send out and empty the iovec array every time it gets
+full while it's being populated.
+---
+ modules/ctl/binrpc_run.c | 33 +++++++++++++++++++++++++++------
+ 1 file changed, 27 insertions(+), 6 deletions(-)
+
+diff --git a/modules/ctl/binrpc_run.c b/modules/ctl/binrpc_run.c
+index 3e3e33f..ce16c24 100644
+--- a/modules/ctl/binrpc_run.c
++++ b/modules/ctl/binrpc_run.c
+@@ -107,11 +107,13 @@ struct iovec_array{
+ struct iovec* v;
+ int idx;
+ int len;
++ void *ctx;
+ };
+
+ /* send */
+ static void rpc_fault(struct binrpc_ctx* ctx, int code, char* fmt, ...);
+ static int rpc_send(struct binrpc_ctx* ctx);
++static int rpc_send_v(struct iovec_array *a);
+ static int rpc_add(struct binrpc_ctx* ctx, char* fmt, ...);
+ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...);
+ static int rpc_printf(struct binrpc_ctx* ctx, char* fmt, ...);
+@@ -254,15 +256,17 @@ error:
+ inline static int append_iovec(struct iovec_array* a, unsigned char* buf,
+ int len)
+ {
+-
+- if (a->idx >= a->len)
+- goto error;
++ int ret;
++
++ if (a->idx >= a->len) {
++ ret = rpc_send_v(a);
++ if (ret < 0)
++ return ret;
++ }
+ a->v[a->idx].iov_base=buf;
+ a->v[a->idx].iov_len=len;
+ a->idx++;
+ return 0;
+-error:
+- return -1; /* overflow */
+ }
+
+
+@@ -537,6 +541,22 @@ static void rpc_fault_reset(struct binrpc_ctx* ctx)
+ }
+ }
+
++/* wrapper around sock_send_v for staggered buffer writing */
++static int rpc_send_v(struct iovec_array *a)
++{
++ int ret;
++
++ if (a->idx <= 0)
++ return 0;
++
++ ret = sock_send_v(a->ctx, a->v, a->idx);
++ if (ret < 0)
++ return ret;
++
++ a->idx = 0;
++ return 0;
++}
++
+ /* build the reply from the current body */
+ static int rpc_send(struct binrpc_ctx* ctx)
+ {
+@@ -551,6 +571,7 @@ static int rpc_send(struct binrpc_ctx* ctx)
+ a.v=v;
+ a.idx=1;
+ a.len=MAX_MSG_CHUNKS;
++ a.ctx = ctx->send_h;
+
+ if (ctx->replied){
+ LOG(L_ERR, "ERROR: binrpc: rpc_send: rpc method %s tried to reply"
+@@ -573,7 +594,7 @@ static int rpc_send(struct binrpc_ctx* ctx)
+ LOG(L_ERR, "ERROR: binrprc: rpc_send: too many message chunks\n");
+ goto error;
+ }
+- if ((err=sock_send_v(ctx->send_h, v, a.idx))<0){
++ if ((err = rpc_send_v(&a)) < 0){
+ if (err==-2){
+ LOG(L_ERR, "ERROR: binrpc: rpc_send: send failed: "
+ "datagram too big\n");
+--
+1.7.9.5
+
Added: kamailio/trunk/debian/patches/upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch?rev=9996&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0057-nathelper-k-nicer-handling-of-no-sdp-in-sdp_1918.patch Mon Oct 8 07:41:14 2012
@@ -1,0 +1,36 @@
+From 7881d44ce92c953e77305545b8773d3e056ea80e Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Fri, 5 Oct 2012 14:34:13 +0200
+Subject: [PATCH] nathelper(k): nicer handling of no sdp in sdp_1918(...)
+
+- don't print error message if there is no sdp body
+(cherry picked from commit 019bcdc56533e7ccd0e1cc7d45b1d2d8ebc868ae)
+---
+ modules_k/nathelper/nathelper.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/modules_k/nathelper/nathelper.c b/modules_k/nathelper/nathelper.c
+index a7f20a4..7195054 100644
+--- a/modules_k/nathelper/nathelper.c
++++ b/modules_k/nathelper/nathelper.c
+@@ -1191,12 +1191,15 @@ sdp_1918(struct sip_msg* msg)
+ {
+ str *ip;
+ int pf;
++ int ret;
+ int sdp_session_num, sdp_stream_num;
+ sdp_session_cell_t* sdp_session;
+ sdp_stream_cell_t* sdp_stream;
+
+- if(0 != parse_sdp(msg)) {
+- LM_ERR("Unable to parse sdp\n");
++ ret = parse_sdp(msg);
++ if(ret != 0) {
++ if(ret < 0)
++ LM_ERR("Unable to parse sdp\n");
+ return 0;
+ }
+
+--
+1.7.9.5
+
Added: kamailio/trunk/debian/patches/upstream/0058-tcp-fix-_wbufq_insert-bug.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/0058-tcp-fix-_wbufq_insert-bug.patch?rev=9996&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/0058-tcp-fix-_wbufq_insert-bug.patch (added)
+++ kamailio/trunk/debian/patches/upstream/0058-tcp-fix-_wbufq_insert-bug.patch Mon Oct 8 07:41:14 2012
@@ -1,0 +1,36 @@
+From 8732b63bf5371914ba0267a22f45aacefe062ad4 Mon Sep 17 00:00:00 2001
+From: Andrei Pelinescu-Onciul <andrei at iptel.org>
+Date: Mon, 1 Oct 2012 11:55:16 +0200
+Subject: [PATCH] tcp: fix _wbufq_insert bug
+
+When _wbufq_insert was called on a connection that had already
+some data added to the write buffer (another process was faster
+and added some data before the process that created the connection
+had a chance to do it), a wrong size was used in a memmove.
+This could lead either to corrupted messages or even crashes (if
+ the messages were big enough to cause a buffer overflow).
+
+Many thanks to Jijo for debugging it.
+
+Reported-by: Jijo
+(cherry picked from commit 745e30c92336bfc3f8682b2c23e02862db688d9e)
+---
+ tcp_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tcp_main.c b/tcp_main.c
+index d629647..cc78878 100644
+--- a/tcp_main.c
++++ b/tcp_main.c
+@@ -808,7 +808,7 @@ inline static int _wbufq_insert(struct tcp_connection* c, const char* data,
+ }
+ if ((q->first==q->last) && ((q->last->b_size-q->last_used)>=size)){
+ /* one block with enough space in it for size bytes */
+- memmove(q->first->buf+size, q->first->buf, size);
++ memmove(q->first->buf+size, q->first->buf, q->last_used);
+ memcpy(q->first->buf, data, size);
+ q->last_used+=size;
+ }else{
+--
+1.7.9.5
+
More information about the Pkg-voip-commits
mailing list