summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Version 0.1.140.1.14Olivier Crête2017-04-037-13/+27
|
* README: Depends on GLib 2.44Olivier Crête2017-04-031-1/+1
|
* stun: Make hmac code NDEBUG safeOlivier Crête2017-04-031-10/+15
|
* stun: Remove double const on intOlivier Crête2017-04-031-1/+1
|
* candidate: Test against possible typeOlivier Crête2017-04-032-5/+5
| | | | There was a confusion and it tested against a value not in the enum.
* configure: Remove missing-noreturn warningOlivier Crête2017-04-031-1/+0
| | | | | We don't have or call noreturn functions in practice and it makes the stun test build fail on clang.
* stun: Use unions fix alignment issuesOlivier Crête2017-04-032-7/+22
| | | | This makes clang happy.
* configure: Make sure flag test really fails on unknown flagOlivier Crête2017-04-031-1/+1
| | | | | | clang on recent macOS seems to only emit a warning on unknown flags which makes this test fail and then when using Werror, it makes the compiler test fail too.
* stun: Rename rand function to make its strengh clearOlivier Crête2017-04-033-3/+3
| | | | | | It's only nonce level randomness, not long term key level. Differential Revision: https://phabricator.freedesktop.org/D1711
* stun: Switch from gcrypt to gnutlsOlivier Crête2017-04-036-66/+42
| | | | | | | GLib already uses it, instead of adding another dep. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1705
* agent: Only try to use the address of the same family to connect to TURNJakub Adam2017-04-031-0/+5
| | | | | | | | | | | | | Using a IPv6 local address to connect to a IPv4 relay just creates an extra discovery attempt that will not provide something useful. This commit fixes another place of TURN discovery creation which was omitted in fc0d3744ebc03f8137866170594968ba61e6be30. In my case it cuts down up to ~15 seconds from candidate gathering phase, making it almost instantaneous. Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1709
* udp-bsd: Log g_socket_send_message() errorsJakub Adam2017-04-031-1/+6
| | | | | | | Those may have previously been silently ignored. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1708
* agent: Eliminate duplicate debug in agent_recv_message_unlocked()Jakub Adam2017-04-031-5/+7
| | | | | | | | | There were two almost consecutive verbose debugs containing basically identical information. Merge them into one message that is printed only when something was actually received. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1707
* agent: Improve debug in component_io_cb()Jakub Adam2017-04-031-6/+11
| | | | | | | | | | | | agent_recv_message_unlocked() always receives a single message and returns a RecvStatus code. Avoid weird debugs like "received -1 valid messages" (when retval is RECV_WOULD_BLOCK) and print the message only when something was actually received. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1706
* configure: gcry_mac_* were added in 1.6Olivier Crête2017-03-311-1/+1
| | | | | They're not present int he 1.5.0 release, so require the newer one.
* Makefile: Build tests before docsOlivier Crête2017-03-311-1/+1
|
* doc: Improve gtkdoc-check environmentOlivier Crête2017-03-311-1/+3
|
* doc: Add missing symbolOlivier Crête2017-03-311-0/+1
|
* configure: Actually require gtk-doc 1.10 for no-tmplOlivier Crête2017-03-311-1/+1
|
* stun: Use libgcrypt for SHA1 supportPhilip Withnall2017-03-314-533/+18
| | | | | | | Now that libstun depends on libgcrypt, we might as well use its SHA1 hash support, rather than carrying around our own. Differential Revision: https://phabricator.freedesktop.org/D1612
* stun: Use libgcrypt for MD5 supportPhilip Withnall2017-03-314-320/+12
| | | | | | | Now that libstun depends on libgcrypt, we might as well use its MD5 hash support, rather than carrying around our own. Differential Revision: https://phabricator.freedesktop.org/D1611
* stun: Use libgcrypt to provide secure random number generationPhilip Withnall2017-03-311-176/+12
| | | | | | | | | | | Previously, a custom Mersenne Twister PRNG was used, which is not securely random. In addition, its seeding fell back to wall-clock time, which is typically predictable. This uses libgcrypt on Linux but retains the Windows code which uses the Windows crypt API. Differential Revision: https://phabricator.freedesktop.org/D1610
* stun: Add libgcrypt dependencyPhilip Withnall2017-03-314-2/+25
| | | | | | This will shortly be used to implement secure random number generation. Differential Revision: https://phabricator.freedesktop.org/D1609
* stun: Remove outdated tests from test-hmacPhilip Withnall2017-03-311-72/+19
| | | | | | | | The SHA-1 and MD5 implementations in libnice are about to be removed, so stop testing them explicitly. In addition, rework the remaining test to use the stun_sha1() API which will remain. Differential Revision: https://phabricator.freedesktop.org/D1608
* stun: Fix cast-align compiler warning when casting sockaddrPhilip Withnall2017-03-281-2/+10
| | | | | | | | | | | | | | | | | There should never be a problem with alignment at runtime, since we’re casting the sockaddr to sockaddr_in or sockaddr_in6 based on its declared sa_family — anything declared as AF_INET6 should have been allocated as a sockaddr_in6, and hence have appropriate alignment (same for AF_INET). This fixes a compiler warning on ARM and other alignment-sensitive architectures. https://phabricator.freedesktop.org/T7718 Signed-off-by: Philip Withnall <withnall@endlessm.com> Reviewed-by: Olivier Crête <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1686
* build: Add default-reviewers key to .arcconfigPhilip Withnall2017-01-171-1/+2
| | | | | | | This should cause all patches submitted using git-phab to be assigned to the #libnice project for review, by default. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
* ms-ice: limit legacy connchecks as per [MS-ICE2] 3.1.4.8.2Jakub Adam2016-10-263-0/+14
| | | | | | | | Client should stop sending connectivity checks with legacy FINGERPRINT when it receives a conncheck message containing IMPLEMENTATION-VERSION attribute. Differential Revision: https://phabricator.freedesktop.org/D1139
* ms-ice: legacy FINGERPRINT modeJakub Adam2016-10-262-18/+89
| | | | | | | | | | | | | | | | | | In order to preserve compatibility with clients which use custom CRC lookup table from [MS-ICE2], whenever a connectivity check request or reply is sent, an additional message is sent along. These two messages differ only in FINGERPRINT attribute - one uses regular CRC lookup table for calculation, the other uses the modified table. When a message is received and FINGERPRINT doesn't pass validation using regular CRC table, the receiver also tries to verify using the modified table. [MS-ICE2] 3.1.4.8.2 describes this procedure. The commit fixes compatibility with older MSOC and Lync clients. Differential Revision: https://phabricator.freedesktop.org/D1138
* stun: add STUN_COMPATIBILITY_MSICE2Jakub Adam2016-10-263-21/+26
| | | | | | | | | Windows Live Messenger is a discontinued service. We can repurpose STUN_COMPATIBILITY_WLM2009 as [MS-ICE2] compatibility. The orignial WLM enumerator is kept for the sake of API compatibility. Differential Revision: https://phabricator.freedesktop.org/D1137
* ms-ice: calculate FINGERPRINT according to [MS-ICE2]Jakub Adam2016-10-263-6/+22
| | | | | | | | | | | | | | | | Connectivity checks that are fully conforming to [MS-ICE2] should contain IMPLEMENTATION-VERSION attribute ([MS-ICE2] 2.2.2.2) equal to 2 and their FINGERPRINT should be calculated as described in RFC5389 section 15.5 (i.e. using standard CRC lookup table). We need this because some Skype for Business clients no longer accept messages whose FINGERPRINT contains a value calculated using Microsoft's old custom CRC table (specified verbatim in [MS-ICE2] 3.1.4.8.2). The change creates a compatibility breakage with legacy Lync clients which will be fixed in following commits. Differential Revision: https://phabricator.freedesktop.org/D1136
* stun: add STUN_USAGE_ICE_COMPATIBILITY_MSICE2Jakub Adam2016-10-263-13/+17
| | | | | | | | | | Windows Live Messenger is a discontinued service. The only users of WLM mode seem to be Lync clients, so STUN_USAGE_ICE_COMPATIBILITY_WLM2009 can be repurposed as [MS-ICE2] compatibility. We keep the WLM enumerator for the sake of API compatibility. Differential Revision: https://phabricator.freedesktop.org/D1135
* conncheck: invoke the debug dump in more placesFabrice Bellet2016-06-231-4/+13
| | | | Differential Revision: https://phabricator.freedesktop.org/D1123
* conncheck: fix pair socket assignmentFabrice Bellet2016-06-231-1/+5
| | | | | | | | | | This patch fixes a problem when a new pair having a peer-reflexive new remote candidate is added while the transport type is udp. In this case the new pair socket really should be the socket of the local candidate, and not the remote (for example, the local candidate may be of relayed type). Differential Revision: https://phabricator.freedesktop.org/D1122
* conncheck: fix tick counter used for debug statsFabrice Bellet2016-06-232-9/+7
| | | | | | | | | The tick counter variable used to display pairs statistics should be per stream defined, to avoid side effects of a global variable, for example always having an odd or even tick counter value when the agent contains just two streams. Differential Revision: https://phabricator.freedesktop.org/D1113
* agent: remove unused agent propertyFabrice Bellet2016-06-231-1/+0
| | | | Differential Revision: https://phabricator.freedesktop.org/D1112
* test-turn: wait for gathering done sequentiallyFabrice Bellet2016-06-231-1/+3
| | | | | | | | Fixes a bug in the logic of the wait loop, where only a single gathering done was required to exit the loop, the other was caught by the following assert. Differential Revision: https://phabricator.freedesktop.org/D1110
* agent: Don't ask upnp to remove not yet allocated candidatesOlivier Crête2016-06-211-0/+3
| | | | This caused a warning in Farstream tests.
* agent: read from the correct TCP-TURN socketJakub Adam2016-06-211-1/+1
| | | | | | | fileno of UDP-TURN NiceSocket is NULL since 0a6c779f and so we need different means to identify the topmost socket. Differential Revision: https://phabricator.freedesktop.org/D1100
* conncheck: dump timer status in the stream check listFabrice Bellet2016-06-201-14/+5
| | | | | | | Instead of printing the static pair priority values, it provides more information to dump each pair timer state, next timeout, and retranmission count, when debugging the whole connchecks list content.
* conncheck: use strncmp instead of strcmpFabrice Bellet2016-06-201-1/+2
| | | | Differential Revision: https://phabricator.freedesktop.org/D931
* tests: fix io-stream when built with optimizationsFabrice Bellet2016-06-202-2/+2
| | | | | | In construct like "while (foo);" when foo is modified outside of the current thread, the variable should be declared volatile to suggest the compiler to read its value without making code optimization.
* stun: avoid expensive call to sprintf in debug-related codeFabrice Bellet2016-06-201-3/+11
|
* agent: rework gathering failures on auto-generated IPsFabrice Bellet2016-06-201-27/+30
| | | | | | | | | | | | | | | | | This patch reworks commit fc4d3aa "ignore gathering failures on auto-generated IPs", that introduces a regression in the test-fullmode check, when turn is on and use_loopback is off. The part of the test that fails is when nice_agent_gather_candidates (ragent...) should return false when the port range for the second component is already busy, line 385. In this case, agent->local_address is null, so the code path added by commit fc4d3aa is taken, and the function will return true, even when not local address has been gathered. The proper fix is to swap the inner and outer loops (on components, and on local addresses), and to go to error when all local addresses of a given component have failed, and to return false only in this case.
* conncheck: state is connected when a pair is nominatedFabrice Bellet2016-06-201-1/+1
| | | | | | | This patch fixes is bug introduced in commit 1ab9d7c "conncheck: Separate valid and succeded states", with the introduction of the valid flag. The agent really should go to connected state when we have a nominated pair, and not just a valid one.
* test-send-recv: reduce deadlock timeoutFabrice Bellet2016-06-201-2/+2
|
* pseudotcp-fuzzy: fix this testFabrice Bellet2016-06-201-3/+3
| | | | | | | | The header size should be 24 bytes only, if we don't want to fuzz the payload too. Moreover, the default lambda parameter is decreased to one, to not fuzz the header too heavily, and consequently increase too much the time for the test to complete, due to exponential retransmission timeout when packets are corrupted.
* pseudotcp: accept several FIN segmentsFabrice Bellet2016-06-201-4/+1
| | | | | This modification allows to gracefully recover from a first corrupted FIN segment.
* build: fix build in alternate builddirFabrice Bellet2016-06-201-0/+1
| | | | Differential Revision: https://phabricator.freedesktop.org/D930
* conncheck: Remove pairs before freeing candidateOlivier Crête2016-06-061-1/+6
| | | | | | | Remove the whole pair before the candidate is to be freed. https://phabricator.freedesktop.org/T7460
* stun timer: Do 7 retransmissions as recommendedOlivier Crête2016-06-062-3/+6
| | | | | | | | | Also reduce the normal timeout to make the test bearable. This is what RFC 5389 section 7.2.1 Differential Revision: https://phabricator.freedesktop.org/D1056 Maniphest Task: https://phabricator.freedesktop.org/T3339