Provide a way to apply exception mount urls that exist on top of a larger
mount, but provide an exception which enforces the url to not be serviced
by the mount code, but by whatever dynamic handler is in place.
Long story, there's also minimal example to take care of.
This change should take care of anything with ETHER_ADDR_LEN in
net/ethernet.h plus windows, for both the lib and example.
Somehow, a string replacement of ns by fsm had damaged
the license text and introduced garbage.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Introduce a LWS_WITH_WOL and an api to wake a mac address, optionally with
an address bind to the local interface to go out on.
Add a helper to parse ascii mac addresses well, and add tests.
Also thanks to OgreTransporter
https://github.com/warmcat/libwebsockets/issues/3016
Updates the `lws_pt_destroy()` logic to ensure the pipe fds are closed if either `pt->dummy_pipe_fds[0]` or `pt->dummy_pipe_fds[1]` are still valid (previously was only checking `pt->dummy_pipe_fds[0]` which was resulting in the write fd to leak whenever a context was destroyed).
SUL callback triggers a dbus timeout handle, handle removes the linked
list entry and free's the memory attached to the entry. Remove the code
where the the entry was removed by the timer callback, which triggered
a double free of the same linked list entry.
Addresses issue #2855 by allowing the parsing of the final byte when there are at least 3 bytes remaining in the buffer.
For every 4 bytes of input, a maximum of 3 bytes of output are generated when decoding the base64 string. The buffer space, therefore, only requires an additional 3 bytes of space. The code checks for space in the buffer before adding null termination.
Very very occasionally on server we try to add a NULL buffer to a buflist.
Let's try dealing with that by failing (caller must always be able to
handle failure from OOM) rather than asserting.
Adds a reference to the libwebsockets context to the OpenSSL context
used by the client vhost. This allows SSL info callbacks to work
correctly for clients, like it currently does for servers.
Co-authored-by: Marty Flickinger <marty.flickinger@garmin.com>
Signed-off-by: Marty Flickinger <marty.flickinger@garmin.com>
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
LWS_HAVE_SYS_RESOURCE_H is correctly set by lws to prevent including
sys/resource.h. However there is no corresponding guard for setrlimit (a
function from that header). This causes a build failure on platforms
which don't have sys/resource.h available.
In case of an SSL_ERROR_SSL in lws_tls_client_connect, the
lws_ssl_get_error call was calling lws_tls_err_describe_clear which
cleared the OpenSSL error from the stack. Thus, the tls.err_helper
attribute was set to the default value from ERR_error_string_n, masking
the actual OpenSSL error message from client code.
Linux has a sockopt flag defined by RFC5014 that informs IPv6 systems with
SLAAC config to prefer to bind the socket to a public address instead of
any temporary private address.
This patch adds a client info flag LCCSCF_IPV6_PREFER_PUBLIC_ADDR that lets
the user indicate the client socket should be prepared with the public
address binding preference.
Currently it's only implemented on Linux.
This fixes clients being able to connect with a certicate that was not
signed by the configured CA when SSL_VERIFY_FAIL_IF_NO_PEER_CERT is set.
The issue only appeared when a client connects via IP address directly and
not use a hostname.
When the hostname was used to connect, the SNI 'callback lws_mbedtls_sni_cb'
overwrote the invalid verfiy mode of
MBEDTLS_SSL_VERIFY_OPTIONAL with MBEDTLS_SSL_VERIFY_REQUIRED by
calling SSL_set_SSL_CTX.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
NEWADDR was errantly deleting route entities, specifically it happend
to delete IPv6 route entries causing a disconnect of all IPv6 clients.
NEWADDR can be issued on a DHCP lease renew, which does not change any
of the routes.
Code was also cleaned up a bit, and added some helpful logging.
Fix spelling mistake it was found while packaging mosquito for debian:
I: mosquitto: spelling-error-in-binary Inital Initial [usr/sbin/mosquitto]
I: mosquitto: spelling-error-in-binary witholding withholding [usr/sbin/mosquitto]
Forwarded: https://github.com/warmcat/libwebsockets/pull/2927
Signed-off-by: Philippe Coval <rzr@users.sf.net>