summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* * FIX [HTTP] fix a blocking case when freeing http clientJaylin2025-04-27
| | | This is a bug I found in the past 2 days. Easily reproduce with low number of taskq_threads and set small timeout duration to http connect aio.
* Fix TLS test.Garrett D'Amore2025-04-19
|
* fix source formattingshikokuchuo2025-03-16
|
* fix aio_reap_list use of nni_aio_free() pointer to incorrect function type ↵shikokuchuo2025-03-16
| | | | UBSAN warning
* http server: sprintf is considered deprecatedGarrett D'Amore2025-03-16
| | | | | | | | | | | | Because it is typically associated with insecure code, use of sprintf is discouraged. Note that our usage was actually quite careful and not insecure, but its mere presence raises concern especially by parties who are unwilling or unable to assess the actual code for correctness. A better choice here would be strlcat, but strlcat is not universally available. (cherry picked from commit d0d48cad89532c56742d85e898f749e587fe32b7)
* fixes #2092 nng_close may hang on Windows (stable version)v1.10.1Garrett D'Amore2025-01-26
|
* api: introduce NNG 2.0 compatible nng_dialer_get_url and nng_listener_get_urlGarrett D'Amore2025-01-04
| | | | This is meant to help applications start adopting new interfaces before converting to NNG 2.0
* api: add nng_sock_send and nng_sock_recvGarrett D'Amore2025-01-04
| | | | | | These are the 2.0 equivalent versions of nng_send_aio and nng_recv_aio. The old names are preserved as aliases for the new. Applications can start adopting these with this release, even before 2.0 is ready.
* fix aio test failures on darwinGarrett D'Amore2025-01-03
| | | | | | | Actually this test appears to be broken everywhere, and the only reason it ever worked is that we took > 50 ms to context switch. (cherry picked from commit 1a4d71cdd4ff80bb79d842c081296c298e7b2295)
* stable: add nng_socket_close to aid transition to 2.0Garrett D'Amore2025-01-03
|
* fixes #1959 Occasional SIGSEGV in nng_recv_aio() on a respondent socketAleksei Solovev2024-12-08
|
* sockfd: check the result of nni_aio_scheduleGarrett D'Amore2024-12-07
| | | | This fixes a possible failure condition on teardown.
* windows ipc: check the return value of nni_aio_scheduleGarrett D'Amore2024-12-07
| | | | | This hopefully addresses a long standing bug with Windows IPC sometimes hanging on shut down.
* Add nng_sub0_subscribe and friends.Garrett D'Amore2024-11-11
| | | | | | These are new functions that replace `NNG_OPT_SUBSCRIBE` and `NNG_OPT_UNSUBSCRIBE`. They are provided here as a transition aid before those options are removed in NNG 2.0.
* Add new functions for socket identity.Garrett D'Amore2024-11-11
| | | | | | | | | | These functions were added in the main branch for NNG 2.0, and we add them here to facilitate converting any code that happened to use the options (`NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, `NNG_OPT_PEER`, `NNG_OPT_PEERNAME`, and `NNG_OPT_RAW`. Its unlikely that many applications need this, but providing these as a transition aid may help applications start adopting new APIs now.
* Integer sign extension bug in socket.c.Garrett D'Amore2024-11-08
| | | | | | | | It turns out that for now this results in early wakeups, due to another bug in the aio framework. But when that bug is fixed, this bug will lead to hangs when redialing. (cherry picked from commit 2dfb99506142f2d59bcc0e0fa7db6b19a3c75d43)
* Mark some functions that are useless as deprecatedGarrett D'Amore2024-11-07
|
* fixes #1900 'u_int32_t' undeclaredGarrett D'Amore2024-11-07
| | | | This bug was already fixed in the main branch.
* fix maybe uninitialized warningshikokuchuo2024-10-07
| | | | (cherry picked from commit 3cfd6ab21bfb8b02fde1e976fc0bf50bf729c8ab)
* fix int-to-pointer conversion warningshikokuchuo2024-10-07
| | | | (cherry picked from commit 9d0b023b39aae37adb6e5cb1a2b926777ffd2023)
* fixes #1866 clock_gettime is not used on Android, even though availablev1.9.0Garrett D'Amore2024-09-07
|
* fixes #1858 Warning on calloc()Garrett D'Amore2024-08-14
|
* log: eliminate redundant newlines sometimes presentGarrett D'Amore2024-08-14
|
* TLS: enable TLS 1.3 for Mbed TLS.Garrett D'Amore2024-08-14
| | | | | This requires using a supporting version of Mbed TLS. We have to use PSA crypto for TLS 1.3.
* fixes #1837 IPC - Use After FreeGarrett D'Amore2024-08-13
| | | | This fixes a problem only found on Windows, that affected both IPC and TCP.
* idhash: add nng_id_visit APIGarrett D'Amore2024-08-11
| | | | | | This allows an efficient way to iterate over the entries stored in an ID hash. The iteration is fast, and requires no additional storage. The order of iteration is not guaranteed.
* fixes #1849 merge wolfSSL support inline, and relicense it under same terms ↵Garrett D'Amore2024-07-22
| | | | as NNG and add PSK
* TLS: make some tests conditional.Garrett D'Amore2024-07-22
| | | | This is in preparation for the wolfSSL integration.
* TLS: Stop making the licensing message a warning - notice is sufficient.Garrett D'Amore2024-07-22
| | | | | Also, while here, prepare for PSK support to be conditional -- it is not necessarily on by default in all future engines (e.g. WolfSSL.)
* TLS: announce which engine we are using (in anticipation of newer TLS engines)Garrett D'Amore2024-07-22
|
* Fix conditional tls_tran_testGarrett D'Amore2024-07-21
|
* fixes #1846 Add support for TLS PSKGarrett D'Amore2024-07-21
| | | | | | This also adds an SP layer transport test for TLS, based on the TCP test but with some additions; this test does not cover all the edge cases for TLS, but it does at least show how to use it.
* fixes #1835 setting NNG_OPT_TLS_CONFIG on socket should hold referenceGarrett D'Amore2024-07-21
|
* UDP: Introduce an experimental (undocumented for now) public API for UDP. ↵Garrett D'Amore2024-06-02
| | | | | | | | (#1838) This exposes the UDP methods as nng_ methods, and adds support for Multicast Membership, which is useful in a variety of situations. No documentation is provided, and applications should consider thios API experimental.
* Fixes problem that causing it unable to pass compile when ↵Peter Wang2024-06-01
| | | | | | NNG_TRANSPORT_ZEROTIER is enabled. It seems that there are typo in the struct type naming. And the wrong function name in `nni_sp_zt_register` that will cause link error.
* windows: refactor IPC to avoid possible hangs and use after free.Garrett D'Amore2024-05-30
|
* Free SP protocol streams before discarding aio objects.Garrett D'Amore2024-05-30
| | | | | | | | This seems to alleviate the use after free crashes, although it does not seem like it should. Current theory is that this closes the handle ensuring that it is unregistered from the I/O subsystem, thus preventing callbacks from firing and referring to objects that have been freed.
* Safer initialization of aiosGarrett D'Amore2024-05-30
|
* fix for pipe statistic crashGarrett D'Amore2024-05-30
|
* windows: TCP connection use-after-free fixesGarrett D'Amore2024-05-30
|
* windows: ipc listen use after freeGarrett D'Amore2024-05-30
|
* windows: ipc conn conn_aio not usedGarrett D'Amore2024-05-30
|
* windows: fix TCP use-after-free in listenerGarrett D'Amore2024-05-30
| | | | | | | The logic with overlapped structures was fragile as it used overlapped ios for the connections rather than a single common one for the listener. This changes it to be more like POSIX, and robust against this error.
* windows: drop the hEvent initialization for win_io structures.Garrett D'Amore2024-05-30
| | | | We use overlapped I/O, so we don't need a separate hEvent.
* windows: IPC conn->conn_io is unusedGarrett D'Amore2024-05-30
|
* Another attempt at the close deadlock, fix use-after-free.Garrett D'Amore2024-05-30
| | | | | | | | When closing pipes, we defer them to be reaped, but also leave them in the match list where they might be picked up by ep_match, or leak. It's best to reap these proactively and ensure that they are not allowed to life longer once they have errored during the negotiation phase.
* fixes #1827 Windows a deadlock on nng_close()Garrett D'Amore2024-05-30
|
* fixes #1825 Compiler warning due to unused variable in win_clock.cGarrett D'Amore2024-05-22
|
* Windows: add a check for broken legacy environments without timespec_get.Garrett D'Amore2024-05-22
| | | | | | | | | | If you want to build on Windows use a toolchain that supports modern APIs. This means, for Microsoft, UCRT (Universal C Runtime), which is supported by default on modern Visual Studio. MinGW users may have to go out of their way to enable it. (New -D_UCRT flag or something.) The supported toolchain for building on Windows is Visual Studio. Use of other tool chains is not officially supported or guaranteed to work. YMMV.
* fix deadlock on socket closeAlexander Zilberkant2024-04-24
| | | | when an `aio` has no `a_cancel_fn` and the task is in `task_prep` abort it on `nni_aio_stop` call