1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00
Commit Graph

292 Commits

Author SHA1 Message Date
Phil Elwell
0ba325af84 Fix agent crash on ARM64 (Raspberry Pi)
The function ILibWebClient_ProcessWebSocketData in
microstack/ILibWebClient.c reads a 64-bit integer from an address that
is only 2-byte aligned. ARM64 kernels support unaligned accesses from
userspace, but it is not enabled by default and frowned upon - the
required exception handling is ugly and inefficient.

Fix that illegal access in a simple way with a memcpy. More involved and
efficient solutions are also available, such as replacing the byte order
conversion functions with de/serialise functions that take a pointer.

Fixes: https://github.com/Ylianst/MeshAgent/issues/183

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2023-06-05 11:24:45 +01:00
Ylian Saint-Hilaire
38f8926ba3 Added Visual Studio 2022 and Windows ARM 64bit support 2023-04-14 13:20:45 -07:00
Bryan Roe
650667126c Added additional logging. Added fix for enumeration bug that could cause SctpSendPacket to go into infinite loop 2022-11-02 23:01:45 -07:00
Bryan Roe
fdb6be806c Updated ILibLifeTime_Check() to flush stale entries instead of skipping them 2022-08-17 11:20:41 -07:00
Bryan Roe
f39cfd6773 Moved where metadata is instantiated, to prevent memory leak in error cases 2022-08-11 14:56:05 -07:00
Bryan Roe
63f420398b Fixed memory leak 2022-08-10 11:25:03 -07:00
Bryan Roe
373b0b424d Fixed memory leaks with Metadata string on Windows IPC socket, and overlapped data structure 2022-08-09 15:15:46 -07:00
Bryan Roe
284a9ca4b7 Fixed leak of a LinkedList by LifeTimeMonitor
Fixed leak of X509 structure by ControlChannelCertificate property of MeshAgent
2022-08-08 13:52:45 -07:00
Bryan Roe
6a0f448c65 1. Fixed while() loop that could get stuck in loop due to 4 byte align issue
2. Added more inline documentation to fs
2022-07-19 22:52:25 -07:00
Bryan Roe
dd8b9f3330 Updated TimerLogic, to check ActiveList when removing from same thread 2022-07-08 16:13:20 -07:00
Bryan Roe
f0635797c6 Fixed memory corruption issue in WebRTC 2022-07-08 12:04:10 -07:00
Bryan Roe
9db6752aaa Added Memory Helper macros for Legacy usage 2022-07-08 12:03:24 -07:00
Bryan Roe
c97e83193c Fixed bug with remote address flags 2022-07-08 10:04:40 -07:00
Bryan Roe
44e2dfaae4 Fixed Digest Unit test issue with persistent connections
Removed debug lines
2022-07-02 01:05:14 -07:00
Bryan Roe
143f7ef578 First Rev of Digest AUTH Unit Test
Fixed crash in ILibWebClient caused by NULL dereference
2022-07-02 00:03:41 -07:00
Bryan Roe
ab94c03594 Updated threading rules of ILibLifeTime_Remove() 2022-06-27 12:29:51 -07:00
Bryan Roe
36681dbbf8 1. Fixed bug where global-tunnel.end() didn't clear the proxy
2. Broke infinite loop that could occur with circular referenced list
3. Added NULL check
2022-06-23 01:33:03 -07:00
Bryan Roe
dec0fcb5c0 1. Added NULL check on util_to_cer
2. Added digest() to tls.GenerateCertificate()
3. Added first rev of Simulated Server, for Agent Self Update Test
2022-06-06 23:50:09 -07:00
Bryan Roe
d8e6e7f3ab Added workaround for Chrome v75+ bug with self-signed certificates, by adding options for specifying alternate keyUsages 2022-06-06 13:25:14 -07:00
Bryan Roe
697e2035c8 Fixed compiler warning 2022-05-08 22:47:12 -07:00
Bryan Roe
39dc727391 Added logging, and fixed SCTP packets to be 4 byte aligned 2022-05-08 22:39:14 -07:00
Bryan Roe
9e4be92cd8 Fixed NULL reference exception 2022-03-25 11:19:00 -07:00
Bryan Roe
0c5d6f9048 Fixed compiler warning on linux 2022-03-23 22:51:59 -07:00
Bryan Roe
6030154d94 1. Updated Helper method for console.log to implement info1 & info2
2. Added more logging to WebRTC
3. Fix edge case when piping RTC DataChannel could result in 100% CPU utilization
2022-03-07 19:09:44 -08:00
Bryan Roe
bc482d2eba 1. Fixed bug where resolve fail resulted in Linux agent accidentally closing FD(0)
2. Updated logic, so calling close on an unconnected socket will still propagate a connect failure
2022-03-04 15:35:16 -08:00
Bryan Roe
93b4a3b6dd Updated, so Windows will flush invalid socket descriptors 2022-03-03 15:17:08 -08:00
Bryan Roe
2660fd008b 1. Fixed Posix bug where invalid FD can cause other FD to not get serviced, and/or cause 100% CPU spike
2. Added Caps/Num/Scroll support to macOS KVM.
2022-03-03 11:16:55 -08:00
Bryan Roe
2aa4dd11b7 1. Fixed edge case bug when maxTimeout<0 and actualTimeout is < UPNP_MAX_WAIT
2. Fixed edge case crash on timer cleanup
2022-02-24 13:11:39 -08:00
Bryan Roe
c7f4906889 Updated so log about certificate not being found, is only written if database didn't exist when agent was started 2022-02-04 17:09:15 -08:00
Ylian Saint-Hilaire
7adf0dddd4 Updated headers. 2022-02-04 14:43:55 -08:00
Bryan Roe
2274477316 changed default max log size to 512kb 2022-01-06 19:09:37 -08:00
Bryan Roe
1f82c971ba 1. ILibAppendStringToDiskEx2: Added max size capability
2. Added ability to specify max error log size
3. Added MeshAgent.maxLogSize readonly property
4. Removed dead code from input.c
2022-01-06 16:40:40 -08:00
Bryan Roe
3a10fa34d2 1. Fixed error case of Resolve()
2. Added 'resolve' support
3. Added new testharnass interface
4. Added clipboard support for PAC/Autoproxy helper
5. Added autoproxy sandbox
2021-12-20 23:12:26 -08:00
Bryan Roe
bcad1d475b added missing #ifdef 2021-12-13 11:39:16 -08:00
Bryan Roe
5d248c683e Fixed subtle issue with socket() on some distros 2021-12-12 23:33:12 -08:00
Ylian Saint-Hilaire
c60d86c657 Removed unused return; 2021-11-24 10:33:30 -08:00
Bryan Roe
0420400920 1. Updated Logging capability
2. Updated Windows unwindhandler() to delete HANDLE when signaled
2021-11-22 11:44:27 -08:00
Bryan Roe
4e92d4530c 1. Updated 'method' property of InboundMessage to be enumerable
2. Added memory check to ptrs structure
3. Fixed bug with remoteInterface's flags
2021-11-15 12:57:45 -08:00
Bryan Roe
1eae8ef45e Updated so environment block is constructed in parent instead of child, when used for execve() on linux. 2021-09-07 16:24:44 -07:00
Bryan Roe
38d9ddc3f5 Fixed compiler warnings 2021-08-30 14:58:22 -07:00
Bryan Roe
67a949207f Updated for OpenBSD 2021-08-30 12:06:36 -07:00
Bryan Roe
667bb3103d Fixed bug in edge case write() logic 2021-08-23 23:48:02 -07:00
Bryan Roe
9dfc4757e4 1. Fixed bug with ILibSparseArray_Move()
2. Added support for ARMADA370-HF (ARCHID=35)
2021-08-05 13:47:56 -07:00
Bryan Roe
7820ef25ba 1. Updated module search to use JS lookup table
2. Fixed bug in proxy failure fallback logic
2021-07-27 19:07:34 -07:00
Bryan Roe
c7a4356dac 1. Merged GC optimization for promise.js
2. Fixed crash that can occur if dgram is GC'ed during event dispatch
3. Fixed compiler warning in ILibWebClient.c
4. Updated GC for dhcp.js
2021-07-17 11:32:25 -07:00
Ylian Saint-Hilaire
a678ff77f0 Fixed agent crash in WebRTC 2021-07-11 12:20:43 -07:00
Ylian Saint-Hilaire
5618516cb9 Fixed RCTPRCVDEBUG in ILibSCTP_AddPacketToHoldingQueue. 2021-07-11 11:42:24 -07:00
Bryan Roe
4f0b8f9eb4 Updated proxy support, to defer DNS resolve to proxy 2021-06-24 22:16:03 -07:00
Bryan Roe
f38283a9d8 Updated Proxy Support: (DNS resolved by proxy)
1. Added ILibAsyncSocket_ConnectToProxyEx()
2. Updated net.socket and tls.socket to use updated proxy method
2021-06-20 21:40:34 -07:00
Bryan Roe
0ea6e28021 1. Remove webSocketMaskOverride switch
2. Fixed bug where disableUpdate was not honored in certain edge cases
2021-06-15 09:18:48 -07:00