[Pkg-voip-commits] r9926 - in /kamailio/trunk/debian/patches: series upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch
maniac-guest at alioth.debian.org
maniac-guest at alioth.debian.org
Fri Aug 3 09:41:38 UTC 2012
Author: maniac-guest
Date: Fri Aug 3 09:41:37 2012
New Revision: 9926
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9926
Log:
upstream fixes
Added:
kamailio/trunk/debian/patches/upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch
Modified:
kamailio/trunk/debian/patches/series
Modified: kamailio/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/series?rev=9926&op=diff
==============================================================================
--- kamailio/trunk/debian/patches/series (original)
+++ kamailio/trunk/debian/patches/series Fri Aug 3 09:41:37 2012
@@ -17,6 +17,7 @@
upstream/0020-tls-set-function-to-return-the-id.patch
upstream/0021-usrloc-k-on-ul-update-re-clone-uri-and-callid-if-ins.patch
upstream/0022-register-k-pack-contact-info-based-on-header-for-sea.patch
+upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch
multiarch_support.patch
no_INSTALL_file.patch
hardening_flags.patch
Added: kamailio/trunk/debian/patches/upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/patches/upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch?rev=9926&op=file
==============================================================================
--- kamailio/trunk/debian/patches/upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch (added)
+++ kamailio/trunk/debian/patches/upstream/rr-k-add-missing-in-Route-header-for-strict-routing.patch Fri Aug 3 09:41:37 2012
@@ -1,0 +1,55 @@
+From a0ffdb7eb2b1478a98422123c78e15ce2b21449f Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Fri, 3 Aug 2012 09:20:03 +0200
+Subject: [PATCH] rr(k): add missing '<' in Route header for strict routing
+
+- if next hop is strict router after loose routing, moving the r-uri to
+ last Route header was missing '<' in front of the address
+- reported by Varsha Venkatraramani
+(cherry picked from commit 090be2532da73f51043f9ba5f4b221fe338d60fa)
+---
+ modules_k/rr/loose.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/modules_k/rr/loose.c b/modules_k/rr/loose.c
+index b74797f..22360df 100644
+--- a/modules_k/rr/loose.c
++++ b/modules_k/rr/loose.c
+@@ -49,6 +49,9 @@
+ #define RR_DRIVEN 1 /*!< The next hop is determined from the route set */
+ #define NOT_RR_DRIVEN -1 /*!< The next hop is not determined from the route set */
+
++#define RR_ROUTE_PREFIX ROUTE_PREFIX "<"
++#define RR_ROUTE_PREFIX_LEN (sizeof(RR_ROUTE_PREFIX)-1)
++
+ #define ROUTE_SUFFIX ">\r\n" /*!< SIP header suffix */
+ #define ROUTE_SUFFIX_LEN (sizeof(ROUTE_SUFFIX)-1)
+
+@@ -307,7 +310,8 @@ static inline int save_ruri(struct sip_msg* _m)
+ }
+
+ /* Create buffer for new lump */
+- len = ROUTE_PREFIX_LEN + _m->first_line.u.request.uri.len + ROUTE_SUFFIX_LEN;
++ len = RR_ROUTE_PREFIX_LEN + _m->first_line.u.request.uri.len
++ + ROUTE_SUFFIX_LEN;
+ s = (char*)pkg_malloc(len);
+ if (!s) {
+ LM_ERR("No memory pkg left\n");
+@@ -315,9 +319,11 @@ static inline int save_ruri(struct sip_msg* _m)
+ }
+
+ /* Create new header field */
+- memcpy(s, ROUTE_PREFIX, ROUTE_PREFIX_LEN);
+- memcpy(s + ROUTE_PREFIX_LEN, _m->first_line.u.request.uri.s, _m->first_line.u.request.uri.len);
+- memcpy(s + ROUTE_PREFIX_LEN + _m->first_line.u.request.uri.len, ROUTE_SUFFIX, ROUTE_SUFFIX_LEN);
++ memcpy(s, RR_ROUTE_PREFIX, RR_ROUTE_PREFIX_LEN);
++ memcpy(s + RR_ROUTE_PREFIX_LEN, _m->first_line.u.request.uri.s,
++ _m->first_line.u.request.uri.len);
++ memcpy(s + ROUTE_PREFIX_LEN + _m->first_line.u.request.uri.len,
++ ROUTE_SUFFIX, ROUTE_SUFFIX_LEN);
+
+ LM_DBG("New header: '%.*s'\n", len, ZSW(s));
+
+--
+1.7.9.5
+
More information about the Pkg-voip-commits
mailing list