[OpenSIPS-Devel] [opensips] Fix an issue with IPv6 in the rtpproxy module (#814)

2016-02-29 Thread sobomax
There is an old issue in the OpenSIPS which may result in SDP containing 
mismatching protocols, when processing rtpproxy_offer() on a IPv6 message with 
default flags. This has been revealed by the new version of the 
[voiptests](https://travis-ci.org/sippy/voiptests/)


00:00:03.089/GLOBAL/alice_ua: SENDING message to [::1]:5060:
INVITE sip:bob_6@[::1]:5060 SIP/2.0
v: SIP/2.0/UDP [::1]:5061;branch=z9hG4bKfffb7b9e25497c853146ea72a3399f5c;rport
Max-Forwards: 70
f: "Alice Smith" ;tag=628b36c02f1d1d5a7b4305c050a3feb6
t: 
i: 759e9723cfa1bc5c9c294b2a6c816e77@184.71.172.86
CSeq: 200 INVITE
m: Anonymous 
Expires: 300
User-Agent: Sippy
cisco-GUID: 3824430197-1272056386-4229849152-47475815
h323-conf-id: 3824430197-1272056386-4229849152-47475815
c: application/sdp
l: 409

v=0
o=- 986474003697 986474003697 IN IP6 ::1
s=-
c=IN IP6 2001:0:0:0:7c1:0:52b8:0
t=0 0
m=audio 40534 RTP/AVP 18 0 2 4 8 96 97 98 101
a=rtpmap:18 G729a/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv



00:00:03.090/GLOBAL/bob_ua: RECEIVED message from [::1]:5060:
INVITE sip:bob_6@[::1]:5062 SIP/2.0
Record-Route: 
Via: SIP/2.0/UDP [0:0:0:0:0:0:0:1]:5060;branch=z9hG4bKddc6.7a0c3345.0
v: SIP/2.0/UDP 
[::1]:5061;received=0:0:0:0:0:0:0:1;branch=z9hG4bKfffb7b9e25497c853146ea72a3399f5c;rport=5061
Max-Forwards: 69
f: "Alice Smith" ;tag=628b36c02f1d1d5a7b4305c050a3feb6
t: 
i: 759e9723cfa1bc5c9c294b2a6c816e77@184.71.172.86
CSeq: 200 INVITE
m: Anonymous 
Expires: 300
User-Agent: Sippy
cisco-GUID: 3824430197-1272056386-4229849152-47475815
h323-conf-id: 3824430197-1272056386-4229849152-47475815
c: application/sdp
Content-Length: 419

v=0
o=- 986474003697 986474003697 IN IP6 ::1
s=-
c=IN IP4 0:0:0:0:0:0:0:1
t=0 0
m=audio 12260 RTP/AVP 18 0 2 4 8 96 97 98 101
a=rtpmap:18 G729a/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
a=nortpproxy:yes

You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSIPS/opensips/pull/814

-- Commit Summary --

  * Fix an issue with IPv6 which may result in SDP containing mismatching

-- File Changes --

M modules/rtpproxy/rtpproxy.c (6)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/814.patch
https://github.com/OpenSIPS/opensips/pull/814.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/814
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [opensips] [1.11] Crash on TCP read (#813)

2016-02-29 Thread Saúl Ibarra Corretgé
I found a crashed OpenSIPS process with the following backtrace:


(gdb) bt
#0  tcp_read_req (con=con@entry=0xa773e948, 
bytes_read=bytes_read@entry=0xbfb3b8cc) at tcp_read.c:711
#1  0x080e08a2 in handle_io (fm=0x99015c8, idx=idx@entry=-1, 
event_type=event_type@entry=1) at tcp_read.c:1036
#2  0x080e271c in io_wait_loop_epoll (repeat=, h=, t=)
at io_wait.h:867
#3  tcp_receive_loop (unix_sock=72) at tcp_read.c:1144
#4  0x080dc690 in tcp_init_children (chd_rank=chd_rank@entry=0x81e362c, 
startup_done=startup_done@entry=0x0)
at tcp_main.c:2378
#5  0x0805db02 in main_loop () at main.c:1011
#6  main (argc=11, argv=0xbfb3bbf4) at main.c:1612


I inspected the code and found a path which leads to the problem. If the code 
entered [this 
if](https://github.com/OpenSIPS/opensips/blob/1.11/tcp_read.c#L704) `req` 
points to freed memory, so 
[this](https://github.com/OpenSIPS/opensips/blob/1.11/tcp_read.c#L711) causes 
the crash.

I think we need to jump to `end_req` right after freeing the request, but I'm 
not that familiar with the code to provide a patch.

Something does look a bit strange to me: if `size` was 0 (which is the case), 
then 
[this](https://github.com/OpenSIPS/opensips/blob/1.11/tcp_read.c#L678-L695) 
code path was followed, which means `release_tcpconn` was called. But when 
`tcp_read_req` returns (if it does so with an error) [this 
code](https://github.com/OpenSIPS/opensips/blob/1.11/tcp_read.c#L1036-L1045) 
will call `release_tcpconn` again.

As a side note, `release_tcpconn` shoudl probably set the `fd` attribute on the 
connection to -1 after closing it 
[here](https://github.com/OpenSIPS/opensips/blob/1.11/tcp_read.c#L451).

Unfortunately I cannot reproduce the issue, it's the first time I've seen it, 
and we've been running 1.11 in production on sip2sip.info for quite a while, 
always with async TCP enabled.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/813___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] aa4b58: rename s_addr to avoid overlapping with Solaris st...

2016-02-29 Thread Razvan Crainea
  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: aa4b580a1d4f2734ab80cd72b79de228d0b6a62e
  
https://github.com/OpenSIPS/opensips/commit/aa4b580a1d4f2734ab80cd72b79de228d0b6a62e
  Author: Razvan Crainea 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/emergency/sip_emergency.c
M modules/emergency/sip_emergency.h

  Log Message:
  ---
  rename s_addr to avoid overlapping with Solaris structs

Discovered by Nathaniel L. Keeling

(cherry picked from commit 6c990040da2fd472993015f787b84a10768e1f6c)


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Perl module - "use UNIVERSAL" is a fatal error starting with Pert 5.22 (#804)

2016-02-29 Thread Răzvan Crainea
Committed in e5f0b55da6fd24b6e661801d26d4dd53b1793fd3, all the way to `1.11`.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/804#issuecomment-190121193___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] 84e370: Deprecate 'use UNIVERSAL'

2016-02-29 Thread Julián Moreno Patiño
  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 84e37060b013b70b67c912758098a9caba1c5a57
  
https://github.com/OpenSIPS/opensips/commit/84e37060b013b70b67c912758098a9caba1c5a57
  Author: Julián Moreno Patiño 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
M modules/perl/lib/perl/OpenSIPS/VDB.pm

  Log Message:
  ---
  Deprecate 'use UNIVERSAL'

(cherry picked from commit e5f0b55da6fd24b6e661801d26d4dd53b1793fd3)


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] e5f0b5: Deprecate 'use UNIVERSAL'

2016-02-29 Thread Julián Moreno Patiño
  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: e5f0b55da6fd24b6e661801d26d4dd53b1793fd3
  
https://github.com/OpenSIPS/opensips/commit/e5f0b55da6fd24b6e661801d26d4dd53b1793fd3
  Author: Julián Moreno Patiño 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
M modules/perl/lib/perl/OpenSIPS/VDB.pm

  Log Message:
  ---
  Deprecate 'use UNIVERSAL'


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] 8dce54: Deprecate 'use UNIVERSAL'

2016-02-29 Thread Julián Moreno Patiño
  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8dce547de66f55b25bd96f6fabd9797898920579
  
https://github.com/OpenSIPS/opensips/commit/8dce547de66f55b25bd96f6fabd9797898920579
  Author: Julián Moreno Patiño 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
M modules/perl/lib/perl/OpenSIPS/VDB.pm

  Log Message:
  ---
  Deprecate 'use UNIVERSAL'

(cherry picked from commit e5f0b55da6fd24b6e661801d26d4dd53b1793fd3)


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] 84be3a: mathops doc: fix typos

2016-02-29 Thread Liviu Chircu
  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 84be3acaadba030d5bbb3cd97f588fe6c13cac37
  
https://github.com/OpenSIPS/opensips/commit/84be3acaadba030d5bbb3cd97f588fe6c13cac37
  Author: Liviu Chircu 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/mathops/README
M modules/mathops/doc/mathops_admin.xml

  Log Message:
  ---
  mathops doc: fix typos


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Switch math_eval to use tinyexpr and remove conversion to RPN (#812)

2016-02-29 Thread Liviu Chircu
Merged #812.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/812#event-570658683___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] ba5da5: Switch math_eval to use tinyexpr and remove conver...

2016-02-29 Thread Liviu Chircu
  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ba5da5897605c784cb1a422302d041470a1ac108
  
https://github.com/OpenSIPS/opensips/commit/ba5da5897605c784cb1a422302d041470a1ac108
  Author: Ryan Bullock 
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
M modules/mathops/README
M modules/mathops/doc/mathops_admin.xml
M modules/mathops/math_funcs.c
M modules/mathops/math_funcs.h
M modules/mathops/mathops.c
A modules/mathops/tinyexpr - LICENSE.md
A modules/mathops/tinyexpr.c
A modules/mathops/tinyexpr.h

  Log Message:
  ---
  Switch math_eval to use tinyexpr and remove conversion to RPN


  Commit: f3a1d2d364f3ea90661f32fed49e44518f5d5cd7
  
https://github.com/OpenSIPS/opensips/commit/f3a1d2d364f3ea90661f32fed49e44518f5d5cd7
  Author: Liviu Chircu 
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
M modules/mathops/README
M modules/mathops/doc/mathops_admin.xml
M modules/mathops/math_funcs.c
M modules/mathops/math_funcs.h
M modules/mathops/mathops.c
A modules/mathops/tinyexpr - LICENSE.md
A modules/mathops/tinyexpr.c
A modules/mathops/tinyexpr.h

  Log Message:
  ---
  Merge pull request #812 from rrb3942/master

Switch math_eval to use tinyexpr and remove conversion to RPN


Compare: 
https://github.com/OpenSIPS/opensips/compare/103e2b78c324...f3a1d2d364f3___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel