1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
Commit graph

3308 commits

Author SHA1 Message Date
Andy Green
e90f005a10 vhost: listen: protect listen port transfer between
...vhosts from vh destroy on zero refcount

https://github.com/warmcat/libwebsockets/issues/2343
2021-07-12 09:29:23 +01:00
Andy Green
041baf93cf mbedtls: sessions: clean session on bail path 2021-07-10 08:28:30 +01:00
Andy Green
4038a7d4b3 windows: align plat insert socket POLLIN handling to linux
This is needed for, eg, libuv
2021-07-10 08:28:21 +01:00
Andy Green
a310e16f8f socks5: cast for mingw3 nonposix recv args 2021-07-10 08:28:06 +01:00
calvin2021y
439651fa7e openssl: manage _GNU_SOURCE better 2021-07-10 08:27:33 +01:00
Andy Green
c042ba8c65 mqtt: handle NULL mqtt publish metadata 2021-07-08 10:18:20 +01:00
marcelo-gonzalez
04761c4b7c event libs: glib: use glib.h specifically
https://github.com/warmcat/libwebsockets/issues/2338
2021-07-08 06:24:52 +01:00
Andy Green
599d318ab8 mqtt: coverity: help coverity see we wont have an mqtt role wsi without mqtt member allocated 2021-07-07 10:34:07 +01:00
Bing Zhao
bae99f63a3 tls: add option to serialize ssl handshake
This is useful for memory constrained systems such as esp32
to improve heap usage minfree/watermark.

On esp32 with simultaneous_ssl_restriction = 2 (MQTT+H1),
Without this change, sys heap minfree ranges from 59k to 71k
  in 100 iterations, average 66.5k.
With this change, sys heap minfree ranges from 64k to 71k
  in 100 interations, average 68.7k
2021-07-07 08:49:36 +01:00
Bing Zhao
ff1b8ed0c9 tls: fix inbalanced tls restrict borrow/return calls
lws_tls_restrict_borrow() returns error when tls restriction limit is
reached. However lws_ssl_close() still calls lws_tls_restrict_return()
to decrease simultaneous_ssl. Thus LWS accepts more than allowed ssl
links, making simultaneous_ssl_restriction useless.

Fix it by tracking lws_tls_restrict_borrow() return value and only
calling lws_tls_restrict_return() if lws_tls_restrict_borrow() is
successful.
2021-07-07 08:47:37 +01:00
Andy Green
ad3901d0fe raw-proxy: fix role bind flag 2021-07-07 08:46:14 +01:00
Andy Green
eeea000ced dns: handle EAI_NONAME as fatal
This causes the blocking dns lookup to treat EAI_NONAME as immediately
fatal, this is usually caused by an assertive NXDOMAIN from the DNS server
or similar.

Not being able to reach the server should continue to retry.

In order to make the problem visible, it reports the situation using
CLIENT_CONNECTION_ERROR, even though it is still inside the outer client
creation call.
2021-07-07 08:43:56 +01:00
Andy Green
55533f96b9 netlink: hold in COLDPLUG until we actually have some routing table contents 2021-06-27 09:06:39 +01:00
Andy Green
fa1a704046 sspc: close: differentiate between ss and sspc at final wsi close
A second chunk of ss / sspc handling did not get cleaned up
along with the other patch from a few weeks ago, it wrongly
treats sspc the same as ss.  This can cause the wrong thing
to be zeroed down, 64-bit and 32-bit builds end up with
different victims.

This patch makes it understand the difference and treat them
accordingly, same as the main for_ss handling.
2021-06-27 09:05:45 +01:00
David Jeffers
3f0fef17aa gcc: gcc8 only recognizes fallthu
Later gcc is more accepting, but there's at least one gcc8 toolchain that only likes
to hear "fallthru", or it will flag it
2021-06-27 09:04:16 +01:00
Andy Green
ea4d800809 service: fix casts for EXTERNAL_POLL 2021-06-24 16:21:56 +01:00
Andy Green
aea9d0cead tls-sessions: remove no stash warning
If there's no stash, we didn't get as far as having a session, so just fail
quietly
2021-06-24 06:37:25 +01:00
Andy Green
10c1b882c6 ss: check destroy null policy 2021-06-24 06:36:10 +01:00
Andy Green
e4aa3ece17 ss: check serialize null policy 2021-06-24 06:35:57 +01:00
Andy Green
4141a68f23 ss: avoid null ss policy on req tx len 2021-06-24 06:35:46 +01:00
Andy Green
de8185db9f ss: avoid null ss policy on req tx 2021-06-24 06:35:33 +01:00
Haopeng Li
526310dfea ss: h1: log dereferences NULL 2021-06-24 06:34:04 +01:00
Andy Green
e3da2a3b3b android: getnameinfo uses nonstandard size_t 2021-06-20 13:41:53 +01:00
Andy Green
8398ef794b getifaddrs: casts for android 2021-06-20 08:43:22 +01:00
Andy Green
02ae95fa79 non-windows: explicit cast vaarg to mode_t 2021-06-20 07:59:14 +01:00
Mykola Stryebkov
7c3c179e0e win32: client: just do WIN32 check 2021-06-20 07:21:31 +01:00
Andy Green
4c8195df22 windows: only conceal mode_t on windows 2021-06-20 07:21:05 +01:00
Andy Green
0ba8df6eb4 threadpool: disassociate wsi on close 2021-06-20 07:20:32 +01:00
Andy Green
94c50618a4 tls: mbedtls: fix cast for dump helper 2021-06-17 14:24:32 +01:00
RobHap
d896d40156 freertos: check for forcing each time around service loop
https://github.com/warmcat/libwebsockets/issues/2325
2021-06-17 14:21:28 +01:00
kekxv
cd87bc1cbe cmake: tls: use CHECK_SYMBOL_EXISTS 2021-06-17 14:21:11 +01:00
Chunho Lee
1c935dff79 clean: else became a NOP 2021-06-17 14:20:09 +01:00
Haopeng Li
896a2e09fc strexp: handle NULL better 2021-06-17 14:19:55 +01:00
DUOLabs333
aa090fc287 cygwin: include in unix type socket init 2021-06-17 14:19:40 +01:00
Khem Raj
014aa77ed3 core-net: Remove unused variable
variable 'n' is being set but it is not used anywhere, latest clang is
able to detect this and flags it

Fixes

lib/core-net/route.c:41:6: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
|         int n = 0;
|             ^
2021-06-06 11:47:52 +01:00
Andy Green
e1ef230187 ss: h2: handle zero length COLON_PATH for metadata 2021-06-06 11:47:43 +01:00
Andy Green
0557e919bb sspc: handle nonexistent metadata cleanly 2021-06-06 11:47:30 +01:00
Andy Green
07bef6b83c coverity: ntp from blob: handle blob missing 2021-06-06 11:47:21 +01:00
Andy Green
2f9ed48d93 coverity: report problem in hpack_dynamic_size() to parent 2021-06-06 11:47:09 +01:00
Andy Green
d155970b67 coverity: h->cwsi must be valid if we are handling rx on it 2021-06-06 11:46:51 +01:00
Jed Lu
c3dd4d05fe ss: sspc: handle destroy for client_connect and request_tx 2021-06-06 11:46:06 +01:00
Jed Lu
4b6a7982b6 ss: do not restrict close handling to WITH_SERVER 2021-05-27 17:13:26 +01:00
Andrey Grafin
62af701cc8 netlink: fix UB on RTM_NEWADDR/RTM_DELADDR
this patch makes ubsan (-fsanitize-undefined-trap-on-error) happy.

let's look at the following scenario:
1. netlink sends RTM_NEWADDR/RTM_DELADDR message
2. rops_handle_POLLIN_netlink() handles message attributes as RTA_*
3. rops_handle_POLLIN_netlink() finds RTA_PRIORITY attribute and
handles it as u32 value, but it's IFA_CACHEINFO attribute in reality
and payload holds another type
4. ubsan throws SIGTRAP

so, don't handle RTM_NEWADDR/RTM_DELADDR attributes as RTA_*
2021-05-27 17:13:17 +01:00
Andy Green
da512b08c1 coverity: ss: handle NULL omd 2021-05-27 17:13:06 +01:00
Andy Green
d85bfb2816 ss: deal with missing handle metadata 2021-05-27 17:12:57 +01:00
Andy Green
b156268521 sse: server: handle close found as HUP 2021-05-23 17:17:33 +01:00
Or Lupovitz
a0bfc98edf mbedtls: server: enforce client cert check when vhost requires 2021-05-23 17:16:32 +01:00
Andy Green
6c39ba15c7 mbedtls: prepare for v3 changes 2021-05-23 17:16:20 +01:00
Andy Green
8a540be959 smd_queue_depth: cast around toolchain int16_t conv warning 2021-05-23 17:16:06 +01:00
Jin Wang
eef783631f sspc: handle DESTROY_ME at proxy link close cb
It's open to user state callback to respond to the DISCONNECT we issue on
the proxy link closure by escalating it to a DESTROY_ME... we have to deal
with that if it comes.
2021-05-20 15:31:36 +01:00