Commit Graph

374 Commits

Author SHA1 Message Date
Nanang Izzuddin f834154bd6
ICE initialization never completes due to race condition (#2525)
* Fix possible race in ICE in TURN allocation init so TURN candidate status stays PJ_EPENDING.
2020-09-29 10:14:07 +07:00
Nanang Izzuddin bd9dff4b02
Media loss after 5 minutes when using ICE+TURN (#2503)
- Assign unique local preferences for candidates with the same type.
- Update component's valid pair condition, instead of just the highest priority, also consider 'nominated' flag.
- Add new compile-time setting PJ_ICE_ST_USE_TURN_PERMANENT_PERM, if set, TURN client session will automatically renew permission for all remote candidates.
- Update local preference for peer reflexive candidate.
- Also update PRIORITY field value in performing connectivity check: use unique local pref (with peer-reflexive candidate type).
- Fix local preference mask for non-standard ICE prio calculation.
2020-08-18 13:03:44 +07:00
jrun 645611d8a9
ice_strans: add on_valid_pair() to callbacks (#2433)
Related to #2263
2020-05-20 12:16:10 +08:00
sauwming 95c29aa1d2
Avoid undefinition of standard macros s_addr and s6_addr (#2423) 2020-05-06 09:38:26 +08:00
Nanang Izzuddin b23633707c
More CI works (#2376)
* pjsua-test:
  - Update pjsua-test module call: wait ICE update before checking media
  - Attempt to fix all failed tests by sipp module: changed SIPp port from 6000 to 50070 (port used by recvfrom module)
  - Update call module: confirm codec priority after change, fix DTLS-SRTP expect may race with state CONFIRMED
  - Add timeout check in telnet-ing to pjsua
  - ICE nego may race with call state CONFIRMED, so mod call better just sleep instead of expecting 'ICE nego success'.

* Other unit tests:
  - Print stack trace on crash on Linux and DarwinOS via SIGSEGV signal handler.
  - Update resolver test: print log on callback error, replace assertion checks with error return, fix comments, sleep periods, fix received packet count may be > 1 if server ignore the request (for example when the test machine experiencing high CPU load).
  - Update ccpp.yml: add -g for jobs with unit-tests.
  - More lenient on tsx retransmission count check in pjsip-test.
  - Update tsx_uac/s_test.c: allow retransmission timing diff from 150 to 500ms to accommodate possible CPU spike on some test machines.
2020-04-30 11:25:19 +07:00
Nanang Izzuddin c3456980ba Add option to exclude benchmark tests in unit tests 2020-03-03 09:53:07 +07:00
Riza Sulistyo ae2e919d9e Misc (re #2210): Fixed various warnings on Visual Studio 2015.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6159 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-06 04:02:56 +00:00
Nanang Izzuddin 95c09007dc Misc (re #2210): Fixed various compile warnings on MSVC2005.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6157 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-05 03:05:30 +00:00
Sauw Ming aa6fc15b1a Re #2229: Check to send pending data in the buffer even if the send completes immediately, since buffer may have been filled by then.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6155 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-04 05:37:21 +00:00
Riza Sulistyo 71ff006510 Close #2263: Add callback to notify when first valid pair is found on ICE negotiation.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6139 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-28 03:51:50 +00:00
Nanang Izzuddin 5d24541741 Misc (re #2210): Updated assertion condition in TURN socket (was removed in r6111). Thanks to Sébastien Blin for the report.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6114 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-03 07:18:17 +00:00
Sauw Ming 5048567815 Re #2210 (misc): Removed assertion in turn sock which can be incorrectly triggered on first conection.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6111 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-29 04:02:11 +00:00
Sauw Ming f1f5301d2f Re #2229: Fixed failed pjnath-test
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6108 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-15 01:11:32 +00:00
Sauw Ming 1a5b4a886b Re #2229: Fixed typo of variable type ioq op key.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6073 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-23 08:09:06 +00:00
Sauw Ming d311c69e84 Re #2218: ICE initialization issue if an error happens during allocating state
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6072 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-23 07:27:53 +00:00
Sauw Ming d024a392ec Fixed #2229: Limitations in ICE data sending
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6071 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-23 07:25:41 +00:00
Nanang Izzuddin 8b06775a7b Fix #2230: Fixed crash in STUN session due to race condition which leads to premature tdata destroy.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6069 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-12 08:46:05 +00:00
Sauw Ming bec1bc9836 Fixed #2218: ICE initialization issue if an error happens during allocating state
Thanks to Sébastien Blin for the patch.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6048 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-29 07:07:11 +00:00
Nanang Izzuddin 3029598af6 Close #2217: Omit deprecated IPv6 addresses from ICE candidates.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6045 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-26 09:32:14 +00:00
Riza Sulistyo 917f917a6f Fix #2214: Check for PJ_ICE_ST_MAX_CAND when adding new ICE candidate.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6040 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-18 09:51:00 +00:00
Riza Sulistyo 63dd024b76 Fix #2213: First packet for TURN over TCP might get dropped.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6039 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-17 07:22:00 +00:00
Nanang Izzuddin 61ffb0ddc4 Misc (re #2147): Fixed compile warnings due to unused var/function.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6020 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-31 06:13:09 +00:00
Nanang Izzuddin 43e40d16a4 Misc (re #2147): Fixed various build warnings (when building for Android).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6010 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-28 04:11:37 +00:00
Sauw Ming 2bd7b29044 Re #1017: Suppress warning of "enumeration value 'PJ_TURN_TP_UDP' not handled in switch"
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6007 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-27 06:31:09 +00:00
Riza Sulistyo 765e804fda Close #1017: TURN TLS transport implementation.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6004 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-24 03:32:17 +00:00
Sauw Ming f7d70ae03e Fixed #2134: STUN server resolution failure causes delay
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5997 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-22 00:39:46 +00:00
Nanang Izzuddin 27077f0524 Re #2197: Fixed silly mistake of wrong size param in bzero-ing a var.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5988 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-14 09:43:38 +00:00
Nanang Izzuddin fa6616c43c Close #2197: Support TURN extensions for TCP allocations (RFC 6062).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5987 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-14 09:31:39 +00:00
Nanang Izzuddin 2c20c1d391 Re #1298: Updated PJNATH to use PJ_ERROR consistently.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5983 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-09 07:47:39 +00:00
Nanang Izzuddin 62927ef6d3 Fix #2138:
- Updated ICE STUN & host candidates generation to be more forgiving on errors, i.e: continue gathering candidates using any available data instead of returning error.
 - Added more logs for debugging.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5861 74dad513-b988-da41-8d7b-12977e46ad98
2018-08-16 02:56:52 +00:00
Sauw Ming fd5674b334 Fixed #2136: Increase default ICE password length as mandated by the RFC
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5850 74dad513-b988-da41-8d7b-12977e46ad98
2018-08-01 08:34:19 +00:00
Riza Sulistyo 696a919a31 Close #2070: Print IPv6 addresses with brackets.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5833 74dad513-b988-da41-8d7b-12977e46ad98
2018-07-23 07:15:08 +00:00
Nanang Izzuddin 147c1021fd Misc (re #2059): Fixed various compile warnings on GCC 8.1 (thanks Alexander Traud for the report).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5813 74dad513-b988-da41-8d7b-12977e46ad98
2018-06-25 07:56:57 +00:00
Riza Sulistyo 111322c0e1 Re #2059 (misc): Don't include test app (exe) when building for Android.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5761 74dad513-b988-da41-8d7b-12977e46ad98
2018-03-27 05:35:03 +00:00
Riza Sulistyo 8438c3eab6 Re #2045 (misc): Fix various warning raised from using clang 4.0.1. Thanks to
Alexander Traud for the report.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5678 74dad513-b988-da41-8d7b-12977e46ad98
2017-11-01 04:55:29 +00:00
Sauw Ming d06375766f Fixed #2046: ICE: Use STUN FINGERPRINT attribute when sending keepalives
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5665 74dad513-b988-da41-8d7b-12977e46ad98
2017-09-28 03:44:53 +00:00
Riza Sulistyo 88ada0cae7 Close #2043: Fixed pjnath-test crash due to access to an invalid callback.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5655 74dad513-b988-da41-8d7b-12977e46ad98
2017-09-20 05:04:25 +00:00
Riza Sulistyo e307352851 Re #1994(misc): Fixed various warnings on VS2015.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5654 74dad513-b988-da41-8d7b-12977e46ad98
2017-09-20 04:34:27 +00:00
Sauw Ming e34fa7ed5e Fixed #2032: NAT64 support for IPv4 interoperability
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5636 74dad513-b988-da41-8d7b-12977e46ad98
2017-08-02 02:51:59 +00:00
Nanang Izzuddin 494f58b07d Misc (re #1994): Fixed compile warnings on MSVC 2005 & 2015.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5635 74dad513-b988-da41-8d7b-12977e46ad98
2017-08-01 07:49:34 +00:00
Nanang Izzuddin 99767f9421 Close #2009: Fixed issue no 2:
- Synchronizing PJMEDIA transport ICE and ICE stream transport lifetime using group lock.
 - Zeroing callback pointer in ICE stream transport destructor.
 - Added few pointer validity checks.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5604 74dad513-b988-da41-8d7b-12977e46ad98
2017-06-14 06:04:12 +00:00
Sauw Ming f43c106b17 Re #2008: Fixed error "Socket is already connected" when trying to connect to TURN server using the above patch
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5596 74dad513-b988-da41-8d7b-12977e46ad98
2017-05-24 01:02:07 +00:00
Nanang Izzuddin 02aa625694 Re #2009: Avoid premature destroy in TURN session by incrementing group lock ref before performing async DNS resolution.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5583 74dad513-b988-da41-8d7b-12977e46ad98
2017-04-19 04:07:23 +00:00
Nanang Izzuddin faa514cfc9 Fixed #2008: Updated TURN socket to use pj_activesock_sendto() for UDP connection (was always using pj_activesock_send()).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5578 74dad513-b988-da41-8d7b-12977e46ad98
2017-04-03 05:31:58 +00:00
Sauw Ming c6dfde7616 Fixed #1966:
* Add option to specify default address family in ICE default candidate
* As answerer, match the address family in the SDP offer if possible.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5562 74dad513-b988-da41-8d7b-12977e46ad98
2017-03-03 02:11:02 +00:00
Nanang Izzuddin 84ad7a0244 Misc (re #1945): Fixed compile warnings on Android 64bit platforms, e.g: dereferencing type-punned pointer, using uninitialized var.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5544 74dad513-b988-da41-8d7b-12977e46ad98
2017-01-24 05:41:05 +00:00
Nanang Izzuddin 1b25ccaf76 Re #1900: Merged changes from trunk.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/uwp@5538 74dad513-b988-da41-8d7b-12977e46ad98
2017-01-23 04:18:59 +00:00
Riza Sulistyo 1aadfca5bf Close #1919: Clear unused-variable warnings.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5535 74dad513-b988-da41-8d7b-12977e46ad98
2017-01-19 10:31:38 +00:00
Nanang Izzuddin 7d9a05c9a3 Re #1513: Applied the new API pj_pool_safe_release().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5534 74dad513-b988-da41-8d7b-12977e46ad98
2017-01-19 07:41:25 +00:00
Nanang Izzuddin 101b72f638 Re #1900: Merged changes from trunk.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/uwp@5532 74dad513-b988-da41-8d7b-12977e46ad98
2017-01-18 10:55:35 +00:00