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>
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
Olivier Crête [Sat, 7 Jan 2023 15:51:15 +0000 (10:51 -0500)]
version 0.1.21
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.
Olivier Crête [Fri, 6 Jan 2023 19:20:01 +0000 (14:20 -0500)]
version 0.1.20.1
Olivier Crête [Fri, 6 Jan 2023 18:29:33 +0000 (13:29 -0500)]
version 0.1.20
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.
Olivier Crête [Fri, 6 Jan 2023 18:20:09 +0000 (13:20 -0500)]
gst: Use gst-full compatible registration functions
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.
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.
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.
Olivier Crête [Wed, 4 Jan 2023 19:40:17 +0000 (14:40 -0500)]
test-turn: Make it work against coturn
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.
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.
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.
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()
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
Olivier Crête [Sun, 6 Nov 2022 20:56:46 +0000 (15:56 -0500)]
gitlab-ci: Fix typo
Olivier Crête [Mon, 17 Oct 2022 11:48:13 +0000 (13:48 +0200)]
ci: Expose full code coverage report to GitLab
Olivier Crête [Mon, 17 Oct 2022 10:47:06 +0000 (12:47 +0200)]
ci: Add code coverage to MRs
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
Olivier Crête [Mon, 17 Oct 2022 11:21:17 +0000 (13:21 +0200)]
ci: Export JUnit report
Olivier Crête [Mon, 17 Oct 2022 14:22:52 +0000 (16:22 +0200)]
ci: Use fdo templates
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.
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
Andrey Skryabin [Fri, 20 May 2022 15:53:50 +0000 (18:53 +0300)]
Conncheck: recheck consent timeout overflow fix
Change-Id: I1dba3b74119f7a3dab016c060696d379ab84d26e
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
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>
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.
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
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
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
Olivier Crête [Thu, 26 May 2022 18:23:31 +0000 (14:23 -0400)]
version: Add NICE_CHECK_VERSION to the documentation
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
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).
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
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
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.
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
Andrey Skryabin [Fri, 20 May 2022 15:53:50 +0000 (18:53 +0300)]
Conncheck: recheck consent timeout overflow fix
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>
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.
Philippe Normand [Thu, 5 May 2022 16:25:38 +0000 (17:25 +0100)]
docs: Add index for symbols added in 0.1.20
Philippe Normand [Thu, 5 May 2022 12:30:54 +0000 (13:30 +0100)]
Add NICE_CHECK_VERSION macro
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.
Olivier Crête [Tue, 3 May 2022 21:42:38 +0000 (17:42 -0400)]
version 0.1.19.1
Olivier Crête [Tue, 3 May 2022 21:32:23 +0000 (17:32 -0400)]
version 0.1.19
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.
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
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.
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.
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.
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>
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
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
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
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
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
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
Sangchul Lee [Thu, 17 Feb 2022 04:05:23 +0000 (13:05 +0900)]
Initialize git
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
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)
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
Olivier Crête [Fri, 26 Nov 2021 19:06:18 +0000 (13:06 -0600)]
gitlab-ci: Allow manual runs
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
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.
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
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.
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).
Ole André Vadla Ravnås [Sat, 15 May 2021 20:20:40 +0000 (22:20 +0200)]
iostream: Implement close() for ICE-TCP also
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.
Ole André Vadla Ravnås [Sat, 15 May 2021 22:22:19 +0000 (00:22 +0200)]
test-io-stream-thread: 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
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
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.
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.
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.
Ole André Vadla Ravnås [Wed, 12 May 2021 22:47:22 +0000 (00:47 +0200)]
agent: Add support for bytestream TCP
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.
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.
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.
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).
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.
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
Olivier Crête [Tue, 2 Nov 2021 02:49:11 +0000 (22:49 -0400)]
gitlab-ci: Add OpenSSL specific build
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.
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
Olivier Crête [Tue, 2 Nov 2021 02:25:02 +0000 (22:25 -0400)]
tests: Use g_assert_true() instead of g_assert() everywhere
Olivier Crête [Tue, 2 Nov 2021 02:22:32 +0000 (22:22 -0400)]
Remove g_assert_cmp* macros outside of the unit tests
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.
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.
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.
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.
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.
Olivier Crête [Fri, 1 Oct 2021 14:08:29 +0000 (10:08 -0400)]
gitlab-ci: Update Windows image
Olivier Crête [Fri, 1 Oct 2021 14:03:49 +0000 (10:03 -0400)]
gitlab-ci: Update ci-fairy to upstream recommended script
YoungHun Kim [Thu, 2 Sep 2021 03:05:23 +0000 (12:05 +0900)]
Change nice_debug_verbose as dlog message
Change-Id: I6d759bf95019e6fcd02bede420bd88d6f980f18e
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.
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
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
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