summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* iostream: Implement close() for ICE-TCP alsoOle André Vadla Ravnås2021-11-224-12/+41
|
* component: Clear buffer pointers to avoid potential double freeOle André Vadla Ravnås2021-11-221-0/+2
| | | | In case close() is called more than once.
* test-io-stream-thread: Handle partial I/OOle André Vadla Ravnås2021-11-221-4/+4
|
* test-io-stream-closing-write: Handle partial I/OOle André Vadla Ravnås2021-11-221-11/+12
|
* test-io-stream-closing-read: Handle partial I/OOle André Vadla Ravnås2021-11-221-12/+11
|
* test-io-stream-common: Remove incorrect assertionOle André Vadla Ravnås2021-11-221-4/+0
| | | | | We cannot assume that the message will be completely filled even in reliable mode.
* test-io-stream-common: Fix GSource callback signatureOle André Vadla Ravnås2021-11-221-1/+11
| | | | | Cannot pass g_main_loop_quit as the GSourceFunc as its return type is void.
* test-io-stream-common: Remove dead codeOle André Vadla Ravnås2021-11-221-6/+0
| | | | | 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.
* agent: Add support for bytestream TCPOle André Vadla Ravnås2021-11-2215-173/+610
|
* conncheck: don't ignore local socket errorsFabrice Bellet2021-11-225-20/+61
| | | | | | | | | | | | | | | | | 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.
* meson: Add agent include dir to uninstalled pkgconfig fileNirbheek Chauhan2021-11-151-0/+2
| | | | | | | | 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.
* agent: Handle failure to create TCP TURN socketOle André Vadla Ravnås2021-11-031-6/+11
| | | | | E.g. if the server address is IPv6 but the local system cannot reach it, so connect() fails right away.
* conncheck: schedule the connection check in most relevant placesFabrice Bellet2021-11-023-15/+10
| | | | | | | 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).
* stun: Use a specific variable to enable Win32 cryptoOlivier Crête2021-11-022-4/+4
| | | | | This should make it possible to use OpenSSL or GnuTLS also on Windows if required.
* gitlab-ci: Try to disable CI on non-MR/non-master branchesOlivier Crête2021-11-021-1/+2
|
* gitlab-ci: Add OpenSSL specific buildOlivier Crête2021-11-021-2/+40
|
* meson: Simplify finding OpenSSLOlivier Crête2021-11-021-12/+11
| | | | | Remove duplicated calls to dependency() so we can have fallback in all cases.
* meson: Fix name of variableOlivier Crête2021-11-021-1/+1
| | | | This is a fix over the recent fix in commit 574f44b4
* tests: Use g_assert_true() instead of g_assert() everywhereOlivier Crête2021-11-0127-350/+350
|
* Remove g_assert_cmp* macros outside of the unit testsOlivier Crête2021-11-0110-42/+42
|
* agent: ensure suceeded and discovered pairs fail the same timeFabrice Bellet2021-11-011-0/+22
| | | | | | | | | | 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.
* Fix error when crypto/ssl libs are found without pkg-configXavier Claessens2021-11-011-2/+4
| | | | In that case crypto_dep is a list and we can't call .found() method.
* agent: Unify constructors into nice_agent_new_fullJuan Navarro2021-11-012-14/+4
| | | | | | | | | 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.
* Use native crypto support on Windows by defaultOle André Vadla Ravnås2021-11-013-5/+106
| | | | | | | | | 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.
* component: reset the stun agent on ice restartFabrice Bellet2021-10-043-3/+10
| | | | | | | | | 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.
* gitlab-ci: Update Windows imageOlivier Crête2021-10-011-1/+1
|
* gitlab-ci: Update ci-fairy to upstream recommended scriptOlivier Crête2021-10-011-7/+10
|
* nice: Bring new symbols to 0.1.19Olivier Crête2021-08-193-6/+3
| | | | It's not released yet and we don't do even/odd in this project.
* nice: Export nice_candidate_transport_to_stringOlivier Crête2021-08-193-5/+2
| | | | Also update the Since to 0.1.19, because it's not really usable now
* nice: Export nice_candidate_type_to_stringOlivier Crête2021-08-193-1/+5
| | | | Also update the Since to 0.1.19, because it's not really usable now
* stun: Make the headers usable from C++ codeabhijeetbhagat2021-07-212-0/+15
| | | | Add the relevant ifdef extern C bits
* agent: Simplify accepting state changes to FAILEDOlivier Crête2021-07-201-5/+1
| | | | | The component can go from any state to FAILED, so simplify that and make it explicit.
* agent: Accept any transition back to the gathering stateOlivier Crête2021-07-201-3/+3
| | | | | | | When doing a ICE restart, which can be done from any state, we can always go back into the gathering state. This fixes a regression introduced by b20ac5ba7b731f2cc698f26e8def28a518de058e
* gitlab-ci: Allow msys CI to failOlivier Crête2021-07-201-0/+1
| | | | It just won't work for now.
* subprojects: Get zlib from Qt mirrorOlivier Crête2021-07-202-1/+10
| | | | Getting it from the upstream mirror seems to fail miserably
* gitlab-ci: Remove meson updateOlivier Crête2021-07-201-7/+0
|
* Update Windows imageOlivier Crête2021-07-201-1/+1
|
* test-restart: fix potential stack buffer overflow with new candidate APIFabrice Bellet2021-05-131-19/+19
|
* test-consent: fix potential stack buffer overflow with new candidate APIFabrice Bellet2021-05-131-19/+19
|
* test-io-stream-pollable: Handle partial readsOle André Vadla Ravnås2021-05-111-7/+12
|
* pseudotcp: Disable Nagle algorithm by defaultOle André Vadla Ravnås2021-05-101-1/+1
| | | | To be consistent with what we do for ICE-TCP.
* tcp-bsd: Handle send before connect() completesOle André Vadla Ravnås2021-05-101-0/+1
|
* agent: Remove duplicated early returnOlivier Crête2021-05-031-4/+0
| | | | The type is already checked to not be peer reflexive earlier.
* agent: Avoid leak on programming errorOlivier Crête2021-05-031-1/+3
| | | | | | Even if the agent is invalid, don't leak. This makes coverity a little happier.
* conncheck: Free password in more obvious wayOlivier Crête2021-05-031-5/+5
| | | | | This should make Coverity's job a little easier. And also fix a little leak in the error path.
* udp-turn: Remove request before freeing itOlivier Crête2021-05-031-1/+1
| | | | | As removing the request from the queue looks into the SendRequest, one needs to unqueue it before freeing it.
* agent: avoid leak of all turn refreshes when disposing the agentFabrice Bellet2021-04-202-23/+23
| | | | | | | | | | With this patch we free all outstanding refreshes when the agent dispose method is called, even those that are in the way to be discarded asynchronously, when a stream is removed. We also make the final user callback of the refresh proces synchronous, so we don't have to deal with an heap use-after-free problem. This also requires to order some parts of code.
* discovery: fix asynchronous agent refreshes pruningFabrice Bellet2021-04-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Asynchronous refreshes pruning may occur when the agent async close function is called, but also when a stream is closed. A flag 'discarding' is used in the CandidateRefresh object to determine if a refresh is already on the way to be asynchronously freed. A refresh definitely freed is removed from agent refresh_list. When the agent async close function is called, it is passed a user callback that will be invoked when all refreshes have been freed. This is not exactly how things work currently, because right now, the callback function is also invoked when all CandidateRefresh objects have the discarding flag set, with the test 'data->items_to_free==0'. In that case, clearly not all refreshes have been freed, as some are still there in the refresh_list with the discarding flag set. This is probably not what the user expects from the function nice_agent_close_async(), where the callback is supposed to be invoked after all refreshes have been freed: and including those asynchronously pruned by nice_prune_stream_async(). This patch adds a supplementary timeout when closing the agent async, that waits until the agent refresh list becomes empty.
* agent: avoid leak of turn refreshesFabrice Bellet2021-04-201-0/+9
| | | | | We keep refreshes having the discarding flag set. They may be freed later if the agent main context remains alive after agent deletion.
* agent: warn when closing the agent with alive turn refreshesFabrice Bellet2021-04-201-0/+5
| | | | | | | | | | | | This patch suggests the developer to close its alive reservations on the turn server before disposing the agent. Not removing reservations on the turn server, will make them alive until their default timeout, generally 300 seconds, which is not fair for the turn server resources, but also it may cause a fatal error 437, "Mismatched allocation: wrong transaction ID", when another agent tries to contact the same turn server using the same nat mapping before this delay expires.