platform/upstream/libnice.git
15 months agoMerge branch 'upstream' into tizen 94/287294/1 accepted/tizen/8.0/unified/20231005.095057 accepted/tizen/unified/20230130.165642 accepted/tizen/unified/20230131.015048 tizen_8.0_m2_release
Sangchul Lee [Thu, 26 Jan 2023 07:37:28 +0000 (16:37 +0900)]
Merge branch 'upstream' into tizen

It is updated to 0.1.21.

Change-Id: If2d9e7f4f256bcc1b2a522402cc1540dcb1bd89e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
15 months agoMerge tag '0.1.21' into upstream upstream upstream/0.1.21
Sangchul Lee [Thu, 26 Jan 2023 07:36:41 +0000 (16:36 +0900)]
Merge tag '0.1.21' into upstream

Libnice release 0.1.21

Change-Id: I9709b8167a04c0a8eedb3f33fe47a21cc6f7f0c8

16 months agoversion 0.1.21 0.1.21
Olivier Crête [Sat, 7 Jan 2023 15:51:15 +0000 (10:51 -0500)]
version 0.1.21

16 months agointerfaces: Only use `ifr_ifindex` if OS supports it
Ole André Vadla Ravnås [Fri, 4 Nov 2022 19:56:08 +0000 (20:56 +0100)]
interfaces: Only use `ifr_ifindex` if OS supports it

This fixes compilation on e.g. macOS and FreeBSD, where it is missing.

16 months agoversion 0.1.20.1
Olivier Crête [Fri, 6 Jan 2023 19:20:01 +0000 (14:20 -0500)]
version 0.1.20.1

16 months agoversion 0.1.20 0.1.20
Olivier Crête [Fri, 6 Jan 2023 18:29:33 +0000 (13:29 -0500)]
version 0.1.20

16 months agoversion: When set nano 0 to be a string
Olivier Crête [Fri, 6 Jan 2023 18:31:45 +0000 (13:31 -0500)]
version: When set nano 0 to be a string

Setting it as a int makes meson abort.

16 months agogst: Use gst-full compatible registration functions
Olivier Crête [Fri, 6 Jan 2023 18:20:09 +0000 (13:20 -0500)]
gst: Use gst-full compatible registration functions

16 months agogst: Remove GStreamer 0.10 support
Philippe Normand [Tue, 8 Nov 2022 13:21:58 +0000 (13:21 +0000)]
gst: Remove GStreamer 0.10 support

The meson build already required 1.x so this has been dead code for a while now.

16 months agotest-consent: Don't try to set the consent prop after creation
Olivier Crête [Fri, 6 Jan 2023 17:51:51 +0000 (12:51 -0500)]
test-consent: Don't try to set the consent prop after creation

It was already set at creation time, so all we got was a warning.

16 months agoaddress: Add introspection-friendly to_string_dup
James Westman [Sun, 11 Sep 2022 00:11:30 +0000 (19:11 -0500)]
address: Add introspection-friendly to_string_dup

nice_address_to_string expects an already-allocated string, which is not
great for introspection. Adds nice_address_to_string_dup, which does the
same thing, but returns a newly allocated string.

16 months agotest-turn: Make it work against coturn
Olivier Crête [Wed, 4 Jan 2023 19:40:17 +0000 (14:40 -0500)]
test-turn: Make it work against coturn

16 months agoagent: Allow getting UDP candidates from a TURN server over TCP
Olivier Crête [Wed, 4 Jan 2023 19:39:44 +0000 (14:39 -0500)]
agent: Allow getting UDP candidates from a TURN server over TCP

Even if the TCP candidates are disabled.

16 months agoagent: Resolve TURN server IP addresses
Olivier Crête [Sun, 1 Jan 2023 23:29:50 +0000 (18:29 -0500)]
agent: Resolve TURN server IP addresses

This should enable having servers that do both IPv4 and IPv6. And
ideally should make life easier for app developers.

16 months agoagent: Resolve STUN server IP address
Olivier Crête [Mon, 26 Dec 2022 23:06:22 +0000 (18:06 -0500)]
agent: Resolve STUN server IP address

This should enable having servers that do both IPv4 and IPv6. And
ideally should make life easier for app developers.

17 months agocandidate: fix assertions caused by API guards in new address API
Mathieu Duponchelle [Sat, 19 Nov 2022 01:38:42 +0000 (02:38 +0100)]
candidate: fix assertions caused by API guards in new address API

The checks were reversed, requiring for instance a non-relay candidate
for calling nice_candidate_relay_address()

17 months agoRedirect stun_debug to dlog 65/283665/6 accepted/tizen/unified/20221115.022352
YoungHun Kim [Tue, 1 Nov 2022 06:36:50 +0000 (15:36 +0900)]
Redirect stun_debug to dlog

 - TIZEN avoid stun_debug_disable() called by environment variables

Change-Id: I606e1718c7422f1f47e756e34cbacf2bef74388e

18 months agogitlab-ci: Fix typo
Olivier Crête [Sun, 6 Nov 2022 20:56:46 +0000 (15:56 -0500)]
gitlab-ci: Fix typo

18 months agoci: Expose full code coverage report to GitLab
Olivier Crête [Mon, 17 Oct 2022 11:48:13 +0000 (13:48 +0200)]
ci: Expose full code coverage report to GitLab

18 months agoci: Add code coverage to MRs
Olivier Crête [Mon, 17 Oct 2022 10:47:06 +0000 (12:47 +0200)]
ci: Add code coverage to MRs

18 months agoAdd configuration file for lcov
Patrick Griffis [Thu, 22 Sep 2022 18:53:00 +0000 (13:53 -0500)]
Add configuration file for lcov

This is useful for accurately testing code coverage. You can use this with:

  meson configure -Db_coverage=true
  meson test
  ninja coverage

18 months agoci: Export JUnit report
Olivier Crête [Mon, 17 Oct 2022 11:21:17 +0000 (13:21 +0200)]
ci: Export JUnit report

18 months agoci: Use fdo templates
Olivier Crête [Mon, 17 Oct 2022 14:22:52 +0000 (16:22 +0200)]
ci: Use fdo templates

18 months agoconncheck: Limit ichecks based on property
Olivier Crête [Thu, 18 Aug 2022 13:22:02 +0000 (09:22 -0400)]
conncheck: Limit ichecks based on property

Limit the number of stored incoming checks based on the property
limiting the number of total connectivity checks instead of using
the fixed limit on the number of remote candidates.

20 months agoConncheck: always updating remote_consent.last_received for selected pair on keepalive 53/279453/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060225 accepted/tizen/7.0/unified/hotfix/20221116.111010 accepted/tizen/unified/20220811.135910 submit/tizen/20220810.081811 tizen_7.0_m2_release
Andrey Skryabin [Mon, 23 May 2022 09:06:05 +0000 (12:06 +0300)]
Conncheck: always updating remote_consent.last_received for selected pair on keepalive

Change-Id: Iab47642897e57154fb422881470c125bf637343a

20 months agoConncheck: recheck consent timeout overflow fix 52/279452/1
Andrey Skryabin [Fri, 20 May 2022 15:53:50 +0000 (18:53 +0300)]
Conncheck: recheck consent timeout overflow fix

Change-Id: I1dba3b74119f7a3dab016c060696d379ab84d26e

21 months agoudp-bsd: Explicitly bind to the interface when creating a socket
Olivier Crête [Fri, 22 Jul 2022 20:55:14 +0000 (16:55 -0400)]
udp-bsd: Explicitly bind to the interface when creating a socket

21 months agoDisable stun/tools/* 52/278752/2 accepted/tizen/unified/20220727.131948 submit/tizen/20220726.122337
Sangchul Lee [Tue, 26 Jul 2022 00:38:48 +0000 (09:38 +0900)]
Disable stun/tools/*

'stund' and 'stunbdc' installed to /usr/bin/ are excluded to compiling
which are not necessary.

Not applying ASLR issue since updated to 1.18 also can be resolved with it.

[Version] 0.1.19-1
[Issue Type] Binary

Change-Id: Ic9f25590b9eb76a913a6ef4b5aa316dfa679a269
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
21 months agointerfaces: Add API to find the interface index from a local address
Olivier Crête [Fri, 22 Jul 2022 20:39:36 +0000 (16:39 -0400)]
interfaces: Add API to find the interface index from a local address

This will find some interface that has the address and will not work
correctly if multiple interfaces have the same address. But in any
case, nothing in libnice expects that and we would need to break the
API to make that work.

21 months agoMerge branch 'upstream' into tizen 98/277698/1 accepted/tizen/unified/20220715.141349 submit/tizen/20220714.013603
Sangchul Lee [Tue, 12 Jul 2022 07:09:03 +0000 (16:09 +0900)]
Merge branch 'upstream' into tizen

It is updated to 0.1.19.

Change-Id: I119abe2c8b875469483bae1fd67f6d0a166b778d

21 months agoMerge tag '0.1.19' into upstream
Sangchul Lee [Wed, 11 May 2022 08:18:32 +0000 (17:18 +0900)]
Merge tag '0.1.19' into upstream

Libnice release 0.1.19

Change-Id: I959060bdca7d21eec19e99d3ce5ff9ed3412a8ca

23 months agocandidate: Copy stun_server with candidate
Olivier Crête [Wed, 1 Jun 2022 17:53:30 +0000 (13:53 -0400)]
candidate: Copy stun_server with candidate

Bug reported and fix suggested by Masato Takahashi

Fixes #164

23 months agoversion: Add NICE_CHECK_VERSION to the documentation
Olivier Crête [Thu, 26 May 2022 18:23:31 +0000 (14:23 -0400)]
version: Add NICE_CHECK_VERSION to the documentation

23 months agoaddress: Add Boxed Type
Olivier Crête [Thu, 26 May 2022 15:45:15 +0000 (11:45 -0400)]
address: Add Boxed Type

This should make the library more easily usable for bindings

23 months agoagent: Support adding optional headers to HTTP proxy client
Johan Sternerup [Fri, 25 Sep 2020 15:14:52 +0000 (17:14 +0200)]
agent: Support adding optional headers to HTTP proxy client

One use case for this is adding an ALPN header which is a MUST
requirement when a HTTP proxy is used in WebRTC (see RFC8835, section
3.4).

23 months agoConncheck: renomination: set use_candidate for pending check on early inbound STUN...
Andrey Skryabin [Mon, 23 May 2022 09:18:12 +0000 (12:18 +0300)]
Conncheck: renomination: set use_candidate for pending check on early inbound STUN with NOMINATION attr

23 months agoConncheck: always updating remote_consent.last_received for selected pair on keepalive
Andrey Skryabin [Mon, 23 May 2022 09:06:05 +0000 (12:06 +0300)]
Conncheck: always updating remote_consent.last_received for selected pair on keepalive

23 months agoNICE_CHECK_VERSION: fix unexpected "git = next version" assumption
Tim-Philipp Müller [Thu, 26 May 2022 14:01:48 +0000 (15:01 +0100)]
NICE_CHECK_VERSION: fix unexpected "git = next version" assumption

0.1.18.1 should not satisfy a check for 0.1.19, especially not
for libraries that release once a year at best.

If someone needs more control they should do a feature check for
the symbol in the headers or lib.

23 months agoFix NICE_CHECK_VERSION in public install
Tim-Philipp Müller [Thu, 26 May 2022 13:56:43 +0000 (14:56 +0100)]
Fix NICE_CHECK_VERSION in public install

Install a nice-version.h so that the version defines
are available.

https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/232

23 months agoConncheck: recheck consent timeout overflow fix
Andrey Skryabin [Fri, 20 May 2022 15:53:50 +0000 (18:53 +0300)]
Conncheck: recheck consent timeout overflow fix

23 months agomeson_option: Enable dlog 52/274852/2 accepted/tizen/unified/20220525.134545 submit/tizen/20220524.055649
Sangchul Lee [Wed, 11 May 2022 02:37:55 +0000 (11:37 +0900)]
meson_option: Enable dlog

[Version] 0.1.18-2
[Issue Type] Log

Change-Id: I666e75c78ef1309b523ec2bb79781b2313f1bfad
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
23 months agocandidate: Add utility function to get STUN server address
Philippe Normand [Thu, 5 May 2022 16:27:33 +0000 (17:27 +0100)]
candidate: Add utility function to get STUN server address

Can be useful to know which STUN server was used to discover the given candidate.

2 years agodocs: Add index for symbols added in 0.1.20
Philippe Normand [Thu, 5 May 2022 16:25:38 +0000 (17:25 +0100)]
docs: Add index for symbols added in 0.1.20

2 years agoAdd NICE_CHECK_VERSION macro
Philippe Normand [Thu, 5 May 2022 12:30:54 +0000 (13:30 +0100)]
Add NICE_CHECK_VERSION macro

2 years agoagent: Initialize variable
Olivier Crête [Tue, 3 May 2022 21:50:35 +0000 (17:50 -0400)]
agent: Initialize variable

There is a codepath where it can be used without being filled.
Found by coverity.

2 years agoversion 0.1.19.1
Olivier Crête [Tue, 3 May 2022 21:42:38 +0000 (17:42 -0400)]
version 0.1.19.1

2 years agoversion 0.1.19 0.1.19 upstream/0.1.19
Olivier Crête [Tue, 3 May 2022 21:32:23 +0000 (17:32 -0400)]
version 0.1.19

2 years agocandidate: Add utility function to get TURN relay address
Philippe Normand [Sat, 16 Apr 2022 11:03:46 +0000 (12:03 +0100)]
candidate: Add utility function to get TURN relay address

Can be useful to know which TURN server is being used as relay server for a given candidate.

2 years agoagent: Hold ref while doing async close
Olivier Crête [Fri, 4 Feb 2022 22:20:52 +0000 (17:20 -0500)]
agent: Hold ref while doing async close

It's possible that the callback will be called synchronously during the
close function, in this case, we need to be ready to the last reference
to the agent to be dropped in this callback.

This fix was suggested by Fabrice Bellet

Fixes #153

2 years agoDon't try to use link-local addresses outside local network
Johan Sternerup [Thu, 20 Jan 2022 14:47:11 +0000 (15:47 +0100)]
Don't try to use link-local addresses outside local network

If we have gathered a host IP-address that is link-local we should
never try to use it for anything else than trying to match it with
another link-local address. Some routers seem to have problems with
traffic from link-local addresses destined at external IP-addresses.
By definition link-local addresses should stay local so there's no
reason to access STUN/TURN from it or try to form a candidate with
another address that is not link-local.

2 years agoagent: Fix warning about required glib version
Nirbheek Chauhan [Fri, 18 Mar 2022 07:05:49 +0000 (12:35 +0530)]
agent: Fix warning about required glib version

../agent/discovery.c: In function ‘on_refresh_remove_timeout’:
../agent/discovery.c:203:13: warning: Not available before 2.60
  203 |       G_GNUC_FALLTHROUGH;
      |             ^~~~~~~~~~~~~

../agent/conncheck.c: In function ‘priv_turn_allocate_refresh_retransmissions_tick_agent_locked’:
../agent/conncheck.c:1656:13: warning: Not available before 2.60
 1656 |       G_GNUC_FALLTHROUGH;
      |             ^~~~~~~~~~~~~

The comment /* fall through */ is enough to cause GCC and Clang to not
emit the implicit-fallthrough warning.

2 years agoagent: Convert g_print() to nice_debug()
Nirbheek Chauhan [Mon, 21 Mar 2022 10:50:22 +0000 (16:20 +0530)]
agent: Convert g_print() to nice_debug()

This was probably added by mistake.

2 years agoUpdate spec file and meson files 53/271253/1 accepted/tizen/unified/20220221.080256 submit/tizen/20220218.104050
Sangchul Lee [Thu, 17 Feb 2022 07:18:16 +0000 (16:18 +0900)]
Update spec file and meson files

Change-Id: I155c032e191ebbc0bcfaf62e6904c1ad28f5dfee
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2 years agomeson: Fix openssl setting 45/271245/1
Olivier Crête [Wed, 26 Jan 2022 18:57:13 +0000 (13:57 -0500)]
meson: Fix openssl setting

This should fix builds on platforms openssl

Change-Id: If13f747fe358f1e7e0043356043a5085781d09c6

2 years agomeson: Simplify finding OpenSSL 44/271244/1
Olivier Crête [Tue, 2 Nov 2021 17:14:55 +0000 (13:14 -0400)]
meson: Simplify finding OpenSSL

Remove duplicated calls to dependency() so we can have fallback in all
cases.

Change-Id: Ic278734a9824e1646aec50a1d807b0451f8bf834

2 years agomeson: Fix name of variable 43/271243/1
Olivier Crête [Tue, 2 Nov 2021 16:33:13 +0000 (12:33 -0400)]
meson: Fix name of variable

This is a fix over the recent fix in commit 574f44b4

Change-Id: I922f0895ae13d5802aea4775860f642d18c8d86c

2 years agoFix error when crypto/ssl libs are found without pkg-config 42/271242/1
Xavier Claessens [Thu, 28 Oct 2021 14:24:39 +0000 (10:24 -0400)]
Fix error when crypto/ssl libs are found without pkg-config

In that case crypto_dep is a list and we can't call .found() method.

Change-Id: Ie63d78530d9a935312263bf9843f76667b17c4f6

2 years agoMerge branch 'upstream' into tizen 35/271235/1
Sangchul Lee [Thu, 17 Feb 2022 05:08:15 +0000 (14:08 +0900)]
Merge branch 'upstream' into tizen

It is updated to 0.1.18.

Change-Id: Ife96288be82519f7cec61c48d5f6f53edd98de79

2 years agoMerge tag '0.1.18' into upstream upstream/0.1.18
Sangchul Lee [Thu, 17 Feb 2022 04:08:01 +0000 (13:08 +0900)]
Merge tag '0.1.18' into upstream

Libnice release 0.1.18

Change-Id: I3af1a67390b647bd36d23002f396bc2406659c7b

2 years agoInitialize git
Sangchul Lee [Thu, 17 Feb 2022 04:05:23 +0000 (13:05 +0900)]
Initialize git

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2 years agoExclude gst plugins from build 03/271103/1 accepted/tizen/unified/20220217.153448 submit/tizen/20220216.051033
Sangchul Lee [Thu, 10 Feb 2022 05:52:49 +0000 (14:52 +0900)]
Exclude gst plugins from build

Gstreamer plugins move on to the gstreamer mono git since 1.20.0.
 : gstreamer/subprojects/gst-plugins-bad/ext/nice

Change-Id: Ib006250b5261ded170f6ba17725d79a24ed000b2
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
(cherry picked from commit 4e38bd1424281f45de01779ec1b1f2b301107f5a)

2 years agomeson: Fix openssl setting
Olivier Crête [Wed, 26 Jan 2022 18:57:13 +0000 (13:57 -0500)]
meson: Fix openssl setting

This should fix builds on platforms openssl

2 years agogitlab-ci: Allow manual runs
Olivier Crête [Fri, 26 Nov 2021 19:06:18 +0000 (13:06 -0600)]
gitlab-ci: Allow manual runs

2 years agotcp-active: Fix use-after-free in error case
Olivier Crête [Fri, 26 Nov 2021 20:38:53 +0000 (14:38 -0600)]
tcp-active: Fix use-after-free in error case

Fixes issue found by Coverity

2 years agoagent: Clear the original message pointer instead of a copy
Olivier Crête [Fri, 26 Nov 2021 16:43:24 +0000 (10:43 -0600)]
agent: Clear the original message pointer instead of a copy

In one case, the message pointer gets replaced by the rfc4571_message
one, so it wasn't getting cleared as expected.

2 years agogstnicesink: disable drop out of segment on nicesink
Guillaume Desmottes [Fri, 26 Nov 2021 14:30:21 +0000 (15:30 +0100)]
gstnicesink: disable drop out of segment on nicesink

It's very tricky and unintuitive to have webrtcbin not sending data
because of the segment.

Fix https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/907

2 years agotest-io-stream-common: Avoid CPU starvation by yielding
Ole André Vadla Ravnås [Thu, 4 Nov 2021 21:48:22 +0000 (22:48 +0100)]
test-io-stream-common: Avoid CPU starvation by yielding

Busy-looping is not a good idea, especially not when run under Valgrind,
where such a thread may result in well-behaved threads running thousands
of times slower. While passing --fair-sched=yes to Valgrind avoids the
issue, it's still better to make our busy-looping less aggressive.

2 years agoagent: Consume data before removing disconnected socket
Ole André Vadla Ravnås [Sun, 16 May 2021 10:35:23 +0000 (12:35 +0200)]
agent: Consume data before removing disconnected socket

This was caught by tests randomly failing (timing out).

2 years agoiostream: Implement close() for ICE-TCP also
Ole André Vadla Ravnås [Sat, 15 May 2021 20:20:40 +0000 (22:20 +0200)]
iostream: Implement close() for ICE-TCP also

2 years agocomponent: Clear buffer pointers to avoid potential double free
Ole André Vadla Ravnås [Sat, 15 May 2021 20:19:03 +0000 (22:19 +0200)]
component: Clear buffer pointers to avoid potential double free

In case close() is called more than once.

2 years agotest-io-stream-thread: Handle partial I/O
Ole André Vadla Ravnås [Sat, 15 May 2021 22:22:19 +0000 (00:22 +0200)]
test-io-stream-thread: Handle partial I/O

2 years agotest-io-stream-closing-write: Handle partial I/O
Ole André Vadla Ravnås [Sat, 15 May 2021 22:08:13 +0000 (00:08 +0200)]
test-io-stream-closing-write: Handle partial I/O

2 years agotest-io-stream-closing-read: Handle partial I/O
Ole André Vadla Ravnås [Sat, 15 May 2021 22:07:49 +0000 (00:07 +0200)]
test-io-stream-closing-read: Handle partial I/O

2 years agotest-io-stream-common: Remove incorrect assertion
Ole André Vadla Ravnås [Fri, 14 May 2021 23:38:21 +0000 (01:38 +0200)]
test-io-stream-common: Remove incorrect assertion

We cannot assume that the message will be completely filled even in
reliable mode.

2 years agotest-io-stream-common: Fix GSource callback signature
Ole André Vadla Ravnås [Wed, 12 May 2021 22:28:53 +0000 (00:28 +0200)]
test-io-stream-common: Fix GSource callback signature

Cannot pass g_main_loop_quit as the GSourceFunc as its return type is
void.

2 years agotest-io-stream-common: Remove dead code
Ole André Vadla Ravnås [Wed, 12 May 2021 22:26:58 +0000 (00:26 +0200)]
test-io-stream-common: Remove dead code

Due to off-by-one errors. Since the code added above now handles what
this code tried to handle, we can go ahead and remove it.

2 years agoagent: Add support for bytestream TCP
Ole André Vadla Ravnås [Wed, 12 May 2021 22:47:22 +0000 (00:47 +0200)]
agent: Add support for bytestream TCP

2 years agoconncheck: don't ignore local socket errors
Fabrice Bellet [Fri, 1 Oct 2021 15:35:44 +0000 (17:35 +0200)]
conncheck: don't ignore local socket errors

With this patch we ensure that local socket errors during connection
establishment are properly transmitted to the connection check layer, so
the related pair can be put in state failed when needed. The local
socket errors we are interested in, are those occuring when the local
source address cannot be bound anymore, because the underlying interface
vanished for example.

In particular, we don't ignore errors coming from g_socket_bind() with
tcp active sockets, that perform a bind to *whatever* local address is
available, in case it cannot bind to the specified address.

This behaviour was demonstrated with the test-tcp example, that tried
to bind to the IPv4 loopback address on a socket initially created for
the IPv6 loopback.

2 years agomeson: Add agent include dir to uninstalled pkgconfig file
Nirbheek Chauhan [Mon, 15 Nov 2021 08:17:30 +0000 (13:47 +0530)]
meson: Add agent include dir to uninstalled pkgconfig file

Meson picks up the includedirs from the library target that it is
building the pkgconfig file for. Since libnice's headers are split
into the nice/ and agent/ subdirs, we need to add agent/ to
include_directories: so that it's automatically added to the
uninstalled pkgconfig file by Meson.

2 years agoagent: Handle failure to create TCP TURN socket
Ole André Vadla Ravnås [Tue, 2 Nov 2021 22:39:30 +0000 (23:39 +0100)]
agent: Handle failure to create TCP TURN socket

E.g. if the server address is IPv6 but the local system cannot reach it,
so connect() fails right away.

2 years agoconncheck: schedule the connection check in most relevant places
Fabrice Bellet [Fri, 23 Oct 2020 15:38:53 +0000 (17:38 +0200)]
conncheck: schedule the connection check in most relevant places

The patch invokes the conncheck timer creation where it makes most
sense: when a new pair is inserted in the conncheck list, and when a
pair is added to the triggered check list (because the conncheck
scheduler works on these two lists).

2 years agostun: Use a specific variable to enable Win32 crypto
Olivier Crête [Tue, 2 Nov 2021 18:18:57 +0000 (12:18 -0600)]
stun: Use a specific variable to enable Win32 crypto

This should make it possible to use OpenSSL or GnuTLS also on Windows if
required.

2 years agogitlab-ci: Try to disable CI on non-MR/non-master branches
Olivier Crête [Tue, 2 Nov 2021 16:46:06 +0000 (12:46 -0400)]
gitlab-ci: Try to disable CI on non-MR/non-master branches

2 years agogitlab-ci: Add OpenSSL specific build
Olivier Crête [Tue, 2 Nov 2021 02:49:11 +0000 (22:49 -0400)]
gitlab-ci: Add OpenSSL specific build

2 years agomeson: Simplify finding OpenSSL
Olivier Crête [Tue, 2 Nov 2021 17:14:55 +0000 (13:14 -0400)]
meson: Simplify finding OpenSSL

Remove duplicated calls to dependency() so we can have fallback in all
cases.

2 years agomeson: Fix name of variable
Olivier Crête [Tue, 2 Nov 2021 16:33:13 +0000 (12:33 -0400)]
meson: Fix name of variable

This is a fix over the recent fix in commit 574f44b4

2 years agotests: Use g_assert_true() instead of g_assert() everywhere
Olivier Crête [Tue, 2 Nov 2021 02:25:02 +0000 (22:25 -0400)]
tests: Use g_assert_true() instead of g_assert() everywhere

2 years agoRemove g_assert_cmp* macros outside of the unit tests
Olivier Crête [Tue, 2 Nov 2021 02:22:32 +0000 (22:22 -0400)]
Remove g_assert_cmp* macros outside of the unit tests

2 years agoagent: ensure suceeded and discovered pairs fail the same time
Fabrice Bellet [Fri, 1 Oct 2021 10:17:19 +0000 (12:17 +0200)]
agent: ensure suceeded and discovered pairs fail the same time

This patch ensures that related succeeded-discovered pairs change to
state failed simultaneously, to avoid leaving dangling pointers if one
is freeed while the other is still in the conncheck list. Such
transition is very rare, and only occurs in regular nomination mode,
when the network conditions change between the time the pair is
initially discovered and the time it is rechecked with the use-candidate
flag.

2 years agoFix error when crypto/ssl libs are found without pkg-config
Xavier Claessens [Thu, 28 Oct 2021 14:24:39 +0000 (10:24 -0400)]
Fix error when crypto/ssl libs are found without pkg-config

In that case crypto_dep is a list and we can't call .found() method.

2 years agoagent: Unify constructors into nice_agent_new_full
Juan Navarro [Tue, 7 Sep 2021 14:15:03 +0000 (16:15 +0200)]
agent: Unify constructors into nice_agent_new_full

Instead of having 3 independent implementations, make the simpler
versions delegate into the full one.

The simplest constructor needs to pass "no option", for which no
constant exists in the NiceAgentOption enum. Thus the new
NICE_AGENT_OPTION_NONE constant is added to reflect this possibility.

2 years agoUse native crypto support on Windows by default
Ole André Vadla Ravnås [Tue, 6 Apr 2021 20:47:17 +0000 (22:47 +0200)]
Use native crypto support on Windows by default

As we only need a few primitives there isn't much OS-specific code
needed, and for applications that don't already depend on OpenSSL or
GnuTLS it simplifies the build process quite a lot.

Note that we use the vintage WinCrypt APIs as the Cryptography Next
Generation APIs are only available on Vista and newer.

2 years agocomponent: reset the stun agent on ice restart
Fabrice Bellet [Fri, 1 Oct 2021 10:41:29 +0000 (12:41 +0200)]
component: reset the stun agent on ice restart

The stun agent may contain references to the password previously stored
in some remote candidates, freeed by nice_component_restart(), that were
used by keep-alive stun requests. These stun replies may arrive later
after ice has been restarted. Since the remote candidates are freeed
when ice is restarted, the stun agent must be reset to get rid of these
related references.

2 years agogitlab-ci: Update Windows image
Olivier Crête [Fri, 1 Oct 2021 14:08:29 +0000 (10:08 -0400)]
gitlab-ci: Update Windows image

2 years agogitlab-ci: Update ci-fairy to upstream recommended script
Olivier Crête [Fri, 1 Oct 2021 14:03:49 +0000 (10:03 -0400)]
gitlab-ci: Update ci-fairy to upstream recommended script

2 years agoChange nice_debug_verbose as dlog message 18/263418/2 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211029.013819 accepted/tizen/unified/20210907.121855 submit/tizen/20210902.060944 submit/tizen/20210906.055733 submit/tizen/20210907.040339 submit/tizen_6.5/20211028.163501 tizen_6.5.m2_release
YoungHun Kim [Thu, 2 Sep 2021 03:05:23 +0000 (12:05 +0900)]
Change nice_debug_verbose as dlog message

Change-Id: I6d759bf95019e6fcd02bede420bd88d6f980f18e

2 years agonice: Bring new symbols to 0.1.19
Olivier Crête [Thu, 19 Aug 2021 19:12:23 +0000 (15:12 -0400)]
nice: Bring new symbols to 0.1.19

It's not released yet and we don't do even/odd in this project.

2 years agonice: Export nice_candidate_transport_to_string
Olivier Crête [Thu, 19 Aug 2021 18:43:13 +0000 (14:43 -0400)]
nice: Export nice_candidate_transport_to_string

Also update the Since to 0.1.19, because it's not really usable now

2 years agonice: Export nice_candidate_type_to_string
Olivier Crête [Thu, 19 Aug 2021 18:42:28 +0000 (14:42 -0400)]
nice: Export nice_candidate_type_to_string

Also update the Since to 0.1.19, because it's not really usable now

2 years agoUse dlog to debug agent 28/262428/20 accepted/tizen/unified/20210824.123845 submit/tizen/20210818.024548
YoungHun Kim [Tue, 10 Aug 2021 09:29:45 +0000 (18:29 +0900)]
Use dlog to debug agent

 - Log tag is LIBNICE_AGENT

Change-Id: I19252689850078b8452e4cd7ae51dc04f275bf4f