summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Also build the doc to put it in pagestest-build-pagesOlivier Crête2018-08-221-0/+14
|
* Add GitLab CI configurationadd-ciOlivier Crête2018-06-211-0/+42
|
* docs: Add missing symbols to various sectionsOlivier Crête2018-06-191-0/+18
|
* Makefile.am: Replace valgrind.sh with valgrind-test-driverOlivier Crête2018-06-191-1/+1
|
* Remove Phabricator .arcconfigOlivier Crête2018-06-181-7/+0
| | | | Now, we use GitLab at https://gitlab.freedesktop.org/libnice/libnice
* test-bind: define MSG_NOSIGNAL if undefinedJustin Kim2018-06-181-1/+3
| | | | | | MacOS X and Windows don't have MSG_NOSIGNAL. Signed-off-by: Justin Kim <justin.kim@collabora.com>
* Fix queue_clear replaced by queue_free errorNicolas Dufresne2018-06-182-2/+4
| | | | | | | | | There was two cases where instead of freeing the queue, we actually clear the queue so it's ready for reused. Notably in nice_socket_free_send_queue(), a missed name function and nicesrc element state change. This regression was introduced by: fa783b1dd727a6ee2b99a111ca24790ae850c2f7
* Fix cast-function-type warning introduced in GCC 8Nicolas Dufresne2018-06-128-28/+20
| | | | | | This is new warning introduced with GCC 8. This is being fixed by using appropriate function, like g_queue_free_full/g_list_free_full or by casting to GCallback before casting to the target function signature. Closes: #46
* discovery: fix candidate foundation using valid charactersMiguel París Díaz2018-06-061-2/+2
| | | | | | | | Following [1] and [2], "-" character is not allowed for foundation Refs [1] https://tools.ietf.org/html/rfc5245#page-73 [2] https://tools.ietf.org/html/rfc5234#appendix-B.1
* test-pseudotcp(-fuzzy): Fix format string warnings causing build errors on ↵Brendan Shanks2018-06-062-3/+4
| | | | | | 32-bit Closes: ttps://gitlab.freedesktop.org/libnice/libnice/issues/45
* stun: Also rename windows-specific functionEdward Hervey2018-06-061-1/+1
| | | | | | | Like all other instances of nice_RAND_bytes that were renamed to nice_RAND_nonce. Fixes the windows build
* agent: Redefine socket error messages for windowsEdward Hervey2018-06-061-0/+8
| | | | In the same way we do it for the other error messages
* stund: Pass sockaddr_storage size for both familiesOlivier Crête2018-05-041-7/+2
|
* stund: Pass the right length for ipv6Olivier Crête2018-05-041-1/+5
|
* Ignore function case warningsOlivier Crête2018-05-041-0/+1
| | | | This makes GLib usage annoying as it makes GSourceFunc casts invalid.
* agent: don't require "reliable" be TRUE in order to use "ice-tcp"Jakub Adam2018-03-232-10/+6
| | | | | | | | | Setting writable socket callbacks doesn't have to be limited to reliable agents. TCP sockets need the callback in any case for correct operation and calling nice_socket_set_writable_callback() on a NiceSocket that has UDP as its base has no effect. Differential Revision: https://phabricator.freedesktop.org/D1726
* discovery: ignore bogus Skype for Business srflx addressesJakub Adam2018-03-231-10/+21
| | | | | | | | | | | | | | | If main SfB TURN server sends our allocation request to an alternate server, the response will have XOR_MAPPED_ADDRESS containing the IP address of the turn server that proxied the message instead of our own actual external IP. Before we create server reflexive candidates upon receiving an allocate response, check that the TURN port got assigned on the same server we sent out allocate request to. Otherwise, the request was proxied and XOR_MAPPED_ADDRESS contains a bogus value we should ignore. Issue introduced by 59fcf95d505c3995f858b826d10cd48321ed383e. Differential Revision: https://phabricator.freedesktop.org/D1949
* agent: make candidate username and password immutableFabrice Bellet2018-03-231-6/+13
| | | | | | | | | | | | | | | With this patch we prevent the username and the password of a candidate to be modified during a session, as required by the RFC, sect 9.1.2. This is also needed from a memory management point of view, because the password string pointer may be recorded in the components stun agent sent_ids[] struct key member, and freeing these values there may cause an use-after-free condition, when an inbound stun is received from this candidate. This behavior has been observed with pidgin, xmpp, and farstream when a same remote candidates are "updated" several times, even if the credentials don't change in this case. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1917
* discovery: ignore all non-relay local candidates when relay is forcedFabrice Bellet2018-03-231-1/+2
| | | | | | | | The tcp server reflexive discovered local candidates must be ignored when force_relay is set. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1899
* conncheck: dont fail a stream with a empty conncheck listFabrice Bellet2018-03-231-3/+6
| | | | | | | | Since commit 17f30e4, we may have a stream with an empty conncheck list, and such a stream obviously should not be tested for failed components. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1895
* socket: ping the stun server address on the right socketFabrice Bellet2018-03-232-6/+10
| | | | | | | | Verify the compatibility of the socket domain with the stun server IP address, before sending a request. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1894
* conncheck: make debug more homonegeousFabrice Bellet2018-03-231-17/+18
| | | | | Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1893
* conncheck: factorize pair state debugFabrice Bellet2018-03-231-38/+31
| | | | | Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1892
* conncheck: the conncheck send function may failFabrice Bellet2018-03-231-2/+10
| | | | | | | | With this patch, we put the pair in state failed if we cannot send the connection check, for example due to missing local credentials. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1891
* test-new-dribble: make credentials swap asymmetricFabrice Bellet2018-03-231-32/+23
| | | | | | | | | | | | the first case of test-new-dribble (standard-test) is updated, by making the credentials swap between the left and right agent asymmetric. Previously, ragent started to receive stun requests without initially knowing lagent candidates. Now, ragent also ignores lagent credentials. This modification allows to test changes introduced by the previous commit. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1890
* conncheck: rework early stun requests handlingFabrice Bellet2018-03-233-145/+66
| | | | | | | | | | | | | | | | | | | | | | With this patch we simplify the code used to handle the incoming stun request when remote candidates or remote credentials have not been received yet. When the remote credentials is unknown, the stun request is stored in a list of incoming_checks for later processing, and no further processing is done, except responding to the request. When the remote credentials are received, the triggered checks for these incoming checks can now be queued, and the related pairs are created. If the remote candidates have not been received when the stun request on a valid local port arrives, a peer-reflexive remote candidate will be created. This candidate may need to be updated later when remote candidates are finally received, including candidate priority and foundation, and also related pairs. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1889
* agent: Fixes incompatible pointer type warning on OSX.Jozsef Vass2018-03-221-1/+1
| | | | The variable tie is actually never read.
* conncheck: handle alternate-server for turn relays differentlyYouness Alaoui2017-11-281-13/+43
| | | | | | | If a relay gives us an alternate-server, we need to cancel and reset every candidate discovery attempt that uses the same server, to avoid ending up with one component on one server and the other component on another server (causing relay candidates with mismatched foundations).
* discovery: Increase discovery_unsched_items whenever we restart a checkYouness Alaoui2017-11-281-0/+4
| | | | | | The discovery_unsched_items is decremented every time a DiscoveryCandidate goes from non-pending to pending. So if we restart a check by setting pending to FALSE, we should re-increase the discovery_unsched_items.
* turn: Add support for ALTERNATE_SERVER in OC2007 CompatibilityYouness Alaoui2017-11-283-0/+29
| | | | | | | | | The MS Office TURN servers will always return the MS_ALTERNATE_SERVER in allocation responses, and if they are not handled, we end up using the main turn server to send allocation requests that then get sent to the alternate server which will return the XOR_MAPPED_ADDRESS containing the IP address of the turn server that proxied the message instead of our own actual external IP.
* conncheck: do not require that all streams have a connection check listMiguel París2017-11-283-23/+211
| | | | | | One or more streams might not have any connection check list if the number of streams differs from the peer agent. Differential Revision: https://phabricator.freedesktop.org/D1880
* Makefile: really enable debug for testsFabrice Bellet2017-11-271-1/+1
| | | | Differential Revision: https://phabricator.freedesktop.org/D1888
* agent: prevent external role change while conncheck is runningFabrice Bellet2017-11-273-3/+74
| | | | | | | | | With this patch, we stash the controlling mode property change, and apply it safely, when it won't interfere with an ongoing conncheck running. According to RFC5245, sect 5.2. "Determining Role", the role is determined for a session, and persists unless an ICE is restarted. Differential Revision: https://phabricator.freedesktop.org/D1887
* stun: Fix FD leak in test/utility codePhilip Withnall2017-09-121-7/+22
| | | | | | | | https://phabricator.freedesktop.org/T7798 Signed-off-by: Philip Withnall <withnall@endlessm.com> Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1819
* tests: Fix agent.h header inclusion in test-gstreamer.cPhilip Withnall2017-09-121-1/+1
| | | | | | Spotted by Lukas Gradl on the mailing list. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Fix copyright dates in test-gstreamer.cPhilip Withnall2017-09-121-1/+1
| | | | | | This code is not 1000 years old. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* conncheck: change state before updating nominated pairsFabrice Bellet2017-09-051-1/+1
| | | | | | When a pair is nominated while in state failed, we first move back to state connecting, then we update the selected pair, and finally we move to state connected.
* conncheck: forgot to put a pair in triggered check listFabrice Bellet2017-09-051-2/+4
| | | | | | | | | | When a new pair is created from an unknown remote candidate, it should be enqueue for a triggered check, to allow it to be marked as nominated on response arrival in priv_mark_pair_nominated(). Creating it in waiting state is not sufficient since the update in priv_mark_pair_nominated() from previous commits. Differential Revision: https://phabricator.freedesktop.org/D1763
* conncheck: update the state of triggered checks pairsFabrice Bellet2017-09-051-71/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, we fix an ambiguity of some parts of the spec, when the document refers to in-progress pairs, that also concern pairs in the triggered checks list. The first cast is in section 7.1.2.5, "Updating the Nominated Flag", when the in-progress pair will be nominated on response arrival. This is handled in function priv_mark_pair_nominated(), when a pair is put to the triggered check list in reaction to a matching inbound stun request. Such a pair in priv_mark_pair_nominated() will _always_ be in the triggered check list, from the previously called function priv_schedule_triggered_check(). The second case is in section 8.1.2, "Updating State" when an in-progress pair stops its retransmission when another pair of higher priority is already nominated. This is handled by function priv_prune_pending_checks(). Until now, pairs enqueued in the triggered check list move transiently to state waiting, according to 7.2.1.4. But this state causes wrong decisions in the two previous cases, because such pairs should in fact rather be considered "like in-progress", to avoid discarding them inadvertantly. This patch update the state of the triggered check list pairs to in-progress. It allows to remove exception handling cited above: the code is a bit more simple, and allows some refactoring in priv_mark_pair_nominated() between RFC and compatibility modes. Differential Revision: https://phabricator.freedesktop.org/D1762
* conncheck: support several stun requests per pairFabrice Bellet2017-09-052-361/+361
| | | | | | | | | | | | This patch should improve the reliabily of the connection check by keeping the record of several simultaneous ongoing stun requests per pair. A new stun request on an in-progress pair typically is caused by in inbound stun request from the peer on this same pair. This is named "Triggered Checks" in the spec. When this situation arises, it is fair to handle these two stun requests simultaneously, the triggered check, and the initial ordinary check, since both can potentially succeed. Differential Revision: https://phabricator.freedesktop.org/D1761
* conncheck: use stun_timer_remainder less frequentlyFabrice Bellet2017-09-051-29/+48
| | | | | | | | We try to use stun_timer_remainder() less frequently, particularily in the debug messages, and favour of the next_tick value associated to the pair. Differential Revision: https://phabricator.freedesktop.org/D1760
* conncheck: make debug sentences more accurateFabrice Bellet2017-09-051-9/+61
| | | | | | We add a helper function to print the pair state in-extenso. Differential Revision: https://phabricator.freedesktop.org/D1759
* conncheck: reorder some chunks of codeFabrice Bellet2017-09-051-436/+422
| | | | | | With this patch we simplify the levels of code indentation. Differential Revision: https://phabricator.freedesktop.org/D1758
* agent: Set error if it isn't setOlivier Crête2017-09-051-1/+1
|
* conncheck: improve role conflict debugFabrice Bellet2017-06-221-5/+19
| | | | | | | This patch displays explicitely the controlling or controlled role of the agent. Differential Revision: https://phabricator.freedesktop.org/D874
* configure: Remove -Wswitch-enumOlivier Crête2017-06-211-1/+0
| | | | | | Creates useless warnings when other libraries change. https://phabricator.freedesktop.org/T7770
* component: Use non-GClosure dummy callbacksOlivier Crête2017-06-211-3/+15
| | | | GClosures are not that cheap to setup
* agent: Don't crash if recv cancelled without a GErrorOlivier Crête2017-06-211-1/+4
|
* Repleace UNRELEASED with 0.1.15Olivier Crête2017-06-212-7/+7
|
* agent: Adjust the nice_agent_new_full() to use flagsOlivier Crête2017-06-213-13/+31
| | | | This makes it easier to read and more extensible.