| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In priv_update_selected_pair(), commit 57393333 changed the code to
re-find a CandidatePair matching the given lfoundation and rfoundation.
However, the foundation does not uniquely identify candidate pairs,
and if we’re aiming to set a specific candidate pair as the selected
pair, this could result in the wrong pair being selected.
This can happen when handling multiple similar candidate pairs, such as
when generating peer reflexive candidates from multiple sources.
See https://tools.ietf.org/html/rfc5245#section-2.4.
Originally spotted by Fabrice Bellet in
https://phabricator.freedesktop.org/T3557.
Differential Revision: https://phabricator.freedesktop.org/D742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the first call to nice_agent_gather_candidates() partially succeeds
(setting a UPnP agent and timeout), then fails before starting
gathering, a second call to nice_agent_gather_candidates() would fail to
set a new UPnP timeout because the UPnP initialisation block would be
skipped. That means gathering would never succeed due to timing out on
UPnP.
Fix that by setting the UPnP timeout whenever a new pending UPnP mapping
is added.
https://phabricator.freedesktop.org/T3534
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
|
|
|
|
|
|
|
|
|
| |
As udp-bsd.ccode is using G_IO_ERROR_CONNECTION_CLOSED glib 2.44
is required.
Change-Id: I1bb63f2484c513c58eeec312ba0835164604c40c
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
https://phabricator.freedesktop.org/T3492
|
|
|
|
|
|
|
| |
This fixes a compiler warning and prevents a possible truncation.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D345
|
|
|
|
|
|
|
|
|
| |
Now that we’re using automake’s parallel test harness, it automatically
redirects all the debug log spew away from the console, so we should
always have it enabled.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D292
|
|
|
|
|
| |
This fixes `arc diff` to select the right repository when submitting
patches.
|
|
|
|
|
|
|
|
| |
Remove all references to the old, unnamespaced versions. This should
cause no functional changes.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D309
|
|
|
|
|
|
|
|
| |
Remove all references to the old, unnamespaced versions. This should
cause no functional changes.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D308
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it reference-counted. This will be useful for allowing
GDatagramBased and GIOStream objects to hold references to the stream
and component they are interested in, allowing removal of the global
NiceAgent lock previously needed to look up the component for every I/O
operation.
Deprecate all the old methods until it’s properly namespaced.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it reference-counted. This will be useful for allowing
GDatagramBased and GIOStream objects to hold references to the stream
and component they are interested in, allowing removal of the global
NiceAgent lock previously needed to look up the component for every I/O
operation.
It also means that nice_stream_close() could eventually become
asynchronous, which would fix a few race conditions.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D306
|
|
|
|
|
|
|
|
|
| |
This is a follow up to T3324, to update the test case to match the new
values generated.
Bug: https://phabricator.freedesktop.org/T3324
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D301
|
|
|
|
|
|
|
| |
Now we can actually see the priority numbers which are unequal.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D300
|
|
|
|
|
|
|
|
| |
This avoids an assertion failure in nice_address_to_string() when the
addresses are compared for priority.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D299
|
|
|
|
|
|
|
|
| |
We depend on GLib 2.36.0, which is a higher version than any of these
version checks cared about, so they were all trivially true or false.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D298
|
|
|
|
|
|
|
|
| |
We depend on GLib 2.36.0; g_thread_init() has been deprecated since
2.32.0, when thread initialisation was changed to happen automatically.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D297
|
|
|
|
|
|
|
|
| |
We depend on GLib 2.36.0, which deprecated g_type_init() since GType
initialisation is now done automatically.
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D296
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renamed the function to priv_process_response_check_for_reflexive()
because it now checks also for server reflexive candidates.
Updated the documentation to indicate that the function never returns
NULL.
Maniphest Tasks: https://phabricator.freedesktop.org/T115
Differential Revision: https://phabricator.freedesktop.org/D243
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In priv_process_response_check_for_peer_reflexive(), mere presence of a candidate in local_candidates doesn't mean there's also some candidate
pair in conncheck_list using it - for instance that candidate may be server reflexive, for which no check pairs are initially created (see
conn_check_add_for_candidate_pair()).
If we fail to find corresponding pair upon receiving such candidate's IP in a conncheck response's XOR-MAPPED-ADDRESS attribute, we shall add a
new one in a similar way we would add a new pair for a just discovered peer reflexive candidate.
Previous priv_process_response_check_for_peer_reflexive() implementation would return NULL, causing a CandidateCheckPair with local candidate of
type HOST to be wrongly selected even though the local host IP might not be directly accessible by the remote counterpart (e.g. it's an address
on a private network segment). In practice this was coming through as a duplex connection that libnice was reporting as properly established,
but only one direction of the communication was actually working.
Maniphest Tasks: https://phabricator.freedesktop.org/T115
Differential Revision: https://phabricator.freedesktop.org/D242
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
The argument passed into the callback is always a base (TCP/UDP) socket,
which can't be directly compared with local candidate's sockptr (may be
TURN, http, or other socket wrapping another one). We're in fact
interested whether sock is a base socket of sockptr.
Maniphest Tasks: T114
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D241
|
|
|
|
|
|
|
|
| |
This will be used in the next commit.
Maniphest Tasks: T114
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.freedesktop.org/D240
|
|
|
|
|
|
|
| |
This is needed for G_IO_ERROR_BROKEN_PIPE, which is used in the I/O
stream code.
Reported by Emanuele Bizzarri <emabiz76@gmail.com> on the mailing list.
|
|
|
|
|
|
|
| |
To match debug_enable in agent/debug.c. Debug can still be enabled by
calling stun_debug_enable() or nice_debug_enable().
Spotted on the mailing list by Tom Chen.
|
|
|
|
|
|
|
|
| |
There is no point in the NiceComponents having a state machine if the
state transition graph is not documented or enforced. Document and
enforce it.
http://phabricator.freedesktop.org/T120
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
Offering multiple host candidates with equal priorities could lead to unpredictable candidate pair selection by our counterparty.
Fixes call disconnection by MS Lync client after 30 seconds while VPN (2nd IP) was active on libnice host.
Maniphest Tasks: T3324
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D234
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Maniphest Tasks: T3324
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D239
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
Fixes "(nice_address_to_string): should not be reached" errors when calling nice_candidate_ms_ice_priority() because of invalid NiceAddress.
Maniphest Tasks: T3324
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D238
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
Offering multiple host candidates with equal priorities could lead to unpredictable candidate pair selection by our counterparty.
Fixes call disconnection by MS Lync client after 30 seconds while VPN (2nd IP) was active on libnice host.
Maniphest Tasks: T3324
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D234
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: So that we can take the base address into account in the calculation.
Maniphest Tasks: T3324
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D235
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Maniphest Tasks: T126
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D223
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per [MS-TURN] Section 2.2.1, TURN message type 0x0104 "Send request
response" isn't supported and the TURN server MUST NOT send them. Thus,
libnice should not remember Send requests in agent->sent_ids because
without replies coming, the number of allowed pending transaction gets
quickly exhausted, causing our data packets to be dropped until a
request timeout frees some space in the queue.
This behavior resulted in choppy reception of our audio on a Lync client
when connected via Lync Edge (TURN) Server.
Maniphest Tasks: T126
Reviewers: pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall
Differential Revision: https://phabricator.freedesktop.org/D223
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
Disable Nagling for underlying TCP sockets used by libnice, because they
are typically used for streaming applications, or for pseudo-TCP; the
bandwidth in both cases is harmed by Nagling.
Based on a patch by Vadim Genkin.
Maniphest Tasks: T3317
Reviewers: vadimgenkin, pwithnall
Projects: #libnice
Reviewed By: pwithnall
Subscribers: pwithnall, vadimgenkin
Differential Revision: https://phabricator.freedesktop.org/D230
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable Nagling for underlying TCP sockets used by libnice, because they
are typically used for streaming applications, or for pseudo-TCP; the
bandwidth in both cases is harmed by Nagling.
Based on a patch by Vadim Genkin.
Maniphest Tasks: T3317
Reviewers: pwithnall
Projects: #libnice
Subscribers: pwithnall, vadimgenkin
Differential Revision: https://phabricator.freedesktop.org/D230
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary: The patch fixes the issue where agent reference count is not properly decremented causing instance leak in cases where component's socket is reset remotely.
Reviewers: #libnice, pwithnall
Projects: #libnice
Reviewed By: #libnice, pwithnall
Subscribers: pwithnall, maximgolunov
Differential Revision: https://phabricator.freedesktop.org/D236
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The patch fixes the issue where agent reference count is not properly decremented causing instance leak in cases where component's socket is reset remotely.
Reviewers: #libnice, pwithnall
Projects: #libnice
Reviewed By: #libnice, pwithnall
Subscribers: pwithnall, maximgolunov
Differential Revision: https://phabricator.freedesktop.org/D236
|
|
|
|
| |
Add stun/usages/.dirstamp.
|
|
|
|
| |
It’s already defined in common.mk.
|
|
|
|
|
|
|
| |
This completes the transition to Phabricator; everyone should be using
the same project settings now.
https://phabricator.freedesktop.org/tag/libnice/
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
Some versions of Windows can return ECONNRESET for UDP recvmsg() calls
if they would otherwise block. Hence, handle the two equivalently; this
should not affect behaviour on Linux, which apparently does not return
ECONNRESET for UDP recvmsg() calls at all.
https://phabricator.freedesktop.org/T121
Maniphest Tasks: T121
Reviewers: ocrete
Projects: #libnice
Reviewed By: ocrete
Subscribers: stwiname, felixSchl
Differential Revision: https://phabricator.freedesktop.org/D227
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some versions of Windows can return ECONNRESET for UDP recvmsg() calls
if they would otherwise block. Hence, handle the two equivalently; this
should not affect behaviour on Linux, which apparently does not return
ECONNRESET for UDP recvmsg() calls at all.
https://phabricator.freedesktop.org/T121
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Summary:
Otherwise the base socket will leak. Spotted by Vadim Genkin.
https://phabricator.freedesktop.org/T125
Maniphest Tasks: T125
Reviewers: ocrete
Projects: #libnice
Reviewed By: ocrete
Subscribers: vadimgenkin
Differential Revision: https://phabricator.freedesktop.org/D228
|
|/ /
| |
| |
| |
| |
| | |
Otherwise the base socket will leak. Spotted by Vadim Genkin.
https://phabricator.freedesktop.org/T125
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
As spotted by Felix <felixschlitter@gmail.com>. This is a static
function which is totally unused in this compilation unit and is causing
build failures with `-Werror=unused-function`.
Maniphest Tasks: T123
Reviewers: felixSchl, ocrete
Projects: #libnice
Differential Revision: https://phabricator.freedesktop.org/D221
|
|/
|
|
|
|
|
|
| |
As spotted by Felix <felixschlitter@gmail.com>. This is a static
function which is totally unused in this compilation unit and is causing
build failures with -Werror=unused-function.
http://phabricator.freedesktop.org/T123
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new socket created in nice_tcp_active_socket_connect() should have its
writable callback set, because it's possible for it to become a base
socket of a peer reflexive candidate, if some is discovered by
connection checks on that TCP active candidate.
Previously, when such prflx candidate became selected, without write_cb
on the socket the agent was never notified about it becoming writable
again after the socket's buffer got filled up. This caused the data flow
to hang permanently.
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: Olivier Crête <olivier.crete@collabora.com>
http://phabricator.freedesktop.org/T117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent versions of MinGW define at least ECONNABORTED and EAFNOSUPPORT,
so only define the various socket errnos if they are not defined
already.
Based on a patch by Alexey Pawlow <alexey.pawlow@gmail.com> and Felix
<felixschlitter@gmail.com>.
Reviewed-by: Olivier Crete <olivier.crete@collabora.com>
Reviewed-by: Felix Schlitter <felixschlitter@gmail.com>
http://phabricator.freedesktop.org/T122
|
|
|
|
|
|
|
|
|
| |
The C runtime on windows does not implement a printf that understands
%zu and other C99 format specifiers. Use G_GSIZE_FORMAT instead. This
is further consistent with the rest of the code base that makes use of
G_GSIZE_FORMAT throughout.
https://github.com/libnice/libnice/pull/3
|
|
|
|
| |
This way, the regular log will only contain connection-time information.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Error introduced in 20ea22e0a11a9bdfe4d8125b68083249b694338a, resulting in a
configure/build error when building without gstreamer:
configure: error: conditional "HAVE_GST_CHECK" was never defined.
Usually this means the macro was only invoked conditionally.
https://bugs.freedesktop.org/show_bug.cgi?id=90801
|
|
|
|
|
|
|
|
|
| |
We’ve neglected to manually update this file once too often — it’s been
out of date for important new symbols (for example,
nice_agent_get_io_stream()) since at least 0.1.11.
Since the format is a simple extension of libnice.sym, we might as well
automatically generate it at dist time.
|