| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Minor Android and Linux warning fixes (#848) Just some warning cleanups. No real issues. Authored-By: Brad House (@bradh352) | 6 个月前 | |
Minor Android and Linux warning fixes (#848) Just some warning cleanups. No real issues. Authored-By: Brad House (@bradh352) | 6 个月前 | |
Implement TCP FastOpen (TFO) RFC7413 (#840) TCP Fast Open (TFO) allows TCP connection establishment in 0-RTT when a client and server have previously communicated. The SYN packet will also contain the initial data packet from the client to the server. This means there should be virtually no slowdown over UDP when both sides support TCP FastOpen, which is unfortunately not always the case. For instance, 1.1.1.1 appears to support TFO, however 8.8.8.8 does not. This implementation supports Linux, Android, FreeBSD, MacOS, and iOS. While Windows does have support for TCP FastOpen it does so via completion APIs only, and that can't be used with polling APIs like used by every other OS. We could implement it in the future if desired for those using ARES_OPT_EVENT_THREAD, but it would probably require adopting IOCP completely on Windows. Sysctls are required to be set appropriately: - Linux: net.ipv4.tcp_fastopen: - 1 = client only (typically default) - 2 = server only - 3 = client and server - MacOS: net.inet.tcp.fastopen - 1 = client only - 2 = server only - 3 = client and server (typically default) - FreeBSD: net.inet.tcp.fastopen.server_enable (boolean) and net.inet.tcp.fastopen.client_enable (boolean) This feature is always-on, when running on an OS with the capability enabled. Though some middleboxes have impacted end-to-end TFO and caused connectivity errors, all modern OSs perform automatic blackholing of IPs that have issues with TFO. It is not expected this to cause any issues in the modern day implementations. This will also help with improving latency for future DoT and DoH implementations. Authored-By: Brad House (@bradh352) | 6 个月前 | |
MSVC compiler warning fixes | 6 个月前 | |
c-ares:if the condition buf->offset > buf->data_len occurs, return directly to prevent out-of-bounds access Signed-off-by: daichuan<daichuan@xiaomi.com> | 6 个月前 | |
MacOS legacy: Attempt to support last MacOS PPC release - 10.6 | 6 个月前 | |
ares_rand.c: fix build error when image is 32-bit CC: termios/lib_cfmakeraw.c c-ares/src/lib/util/ares_rand.c: In function 'ares_u32_from_ptr': c-ares/src/lib/util/ares_rand.c:59:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 59 | return (unsigned int)((((ares_uint64_t)addr >> 32) & 0xFFFFFFFF) | ^ c-ares/src/lib/util/ares_rand.c:60:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 60 | ((ares_uint64_t)addr & 0xFFFFFFFF)); Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
cmake: Android requires C99 (#748) I tried to build c-ares using CMake with the latest Android NDK (r26/27), but failed as follows. Building C object _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/ares__buf.c.o FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/ares__buf.c.o In file included from c-ares/src/lib/ares__buf.c:27: In file included from c-ares/include/ares.h:85: In file included from Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/netinet/in.h:36: In file included from Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/linux/in.h:231: In file included from Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/aarch64-linux-android/asm/byteorder.h:12: In file included from Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/linux/byteorder/little_endian.h:17: Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/linux/swab.h:28:8: error: unknown type name 'inline' 28 | static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) { | ^ Android/sdk/ndk/27.0.11718014/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/linux/swab.h:28:47: error: expected ';' after top level declarator 28 | static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) { | ^ It looks like the NDK recently added C99 code containing inline functions, but c-ares is setting the C_STANDARD CMake property to C90. Fix By: Jiwoo Park (@jimmy-park) | 6 个月前 | |
Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS (#695) The previous build system allowed overwriting of CFLAGS/CPPFLAGS/CXXFLAGS on the make command line. Switch to using AM_CFLAGS/AM_CPPFLAGS/AM_CXXFLAGS when we set our own flags for building which ensures they are kept even when a user tries to override. Fixes Bug: #694 Fix By: Brad House (@bradh352) | 6 个月前 | |
Data Structure: Dynamic Array (#841) Create a new data structure for a basic growable indexable array, supporting the features you'd normally expect such as insert (at, last, first), remove (at, last, first), and get (at, last, first). Internally all data is stored in an appropriately sized array that can directly be returned to the caller as a C array of the data type provided. The array grows by powers of two, and has optimizations for head and tail removals. Array modifications can be risky (e.g. wrong reallocation sizes, mis-sized memory moves, out-of-bounds access), so it makes sense to have standardized code that is well tested. The arrays used by the dns record parser / writer have been converted to the new array data structure as have a few other instances. Authored-By: Brad House (@bradh352) | 6 个月前 | |
clang-format | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
mem leak due to ares__hosts_entry_to_hostent() allocation strategy (#824) ares__hosts_entry_to_hostent() would allocate a separate buffer for each address, but ares_free_hostent() expects a single allocation to hold all addresses. This PR fixes this issue and simplifies the logic by using the already-existing ares__addrinfo2hostent() to write the hostent instead of coming up with yet another way to write the structure. Fixes #823 Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Linux TFO depends on TCP_FASTOPEN_CONNECT not MSG_FASTOPEN During development we were initially using MSG_FASTOPEN but then switched to TCP_FASTOPEN_CONNECT for Linux, but we left in the build-time dependency on just MSG_FASTOPEN which predates TCP_FASTOPEN_CONNECT. This causes build issues on legacy platforms like CentOS 7. Fixes #850 Reported-By: Erik Lax (@eriklax) | 6 个月前 | |
ares_ipv6: fix build error when CONFIG_NET_IPv6 is not set Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
clang-format | 6 个月前 | |
Reformat code using clang-format (#579) c-ares uses multiple code styles, standardize on one. Talking with @bagder he feels strongly about maintaining an 80 column limit, but feels less strongly about things I feel strongly about (like alignment). Can re-run the formatter on the codebase via: clang-format -i */*.c */*.h */*/*.c */*/*.h Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Windows UWP (Store) support fix (#845) Because AppVeyor's version of MSVC needed to be patched to build UWP applications: https://developercommunity.visualstudio.com/t/clexe-compiler-error-C1007-when-compili/10486219 We ended up disabling UWP builds in our CI environment. It turns out UWP support had broken in the meantime: https://github.com/microsoft/vcpkg/pull/40213 This PR fixes the build regression and also adds a GitHub action CI workflow for building the UWP app so we can catch this in the future. Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Reformat code using clang-format (#579) c-ares uses multiple code styles, standardize on one. Talking with @bagder he feels strongly about maintaining an 80 column limit, but feels less strongly about things I feel strongly about (like alignment). Can re-run the formatter on the codebase via: clang-format -i */*.c */*.h */*/*.c */*/*.h Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Reformat code using clang-format (#579) c-ares uses multiple code styles, standardize on one. Talking with @bagder he feels strongly about maintaining an 80 column limit, but feels less strongly about things I feel strongly about (like alignment). Can re-run the formatter on the codebase via: clang-format -i */*.c */*.h */*/*.c */*/*.h Fix By: Brad House (@bradh352) | 6 个月前 | |
ares_init.c: use kconfig value as default Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
Auto reload config on changes (requires EventThread) (#759) Automatically detect configuration changes and reload. On systems which provide notification mechanisms, use those, otherwise fallback to polling. When a system configuration change is detected, it asynchronously applies the configuration in order to ensure it is a non-blocking operation for any queries which may still be being processed. On Windows, however, changes aren't detected if a user manually sets/changes the DNS servers on an interface, it doesn't appear there is any mechanism capable of this. We are relying on NotifyIpInterfaceChange() for notifications. Fixes Issue: #613 Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
ares_init.c: use kconfig value as default Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
ares_process: move hostbuffer out of the stack Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
Minor Android and Linux warning fixes (#848) Just some warning cleanups. No real issues. Authored-By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
ares_ipv6: fix build error when CONFIG_NET_IPv6 is not set Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Minor Android and Linux warning fixes (#848) Just some warning cleanups. No real issues. Authored-By: Brad House (@bradh352) | 6 个月前 | |
ares_sysconfig_files.c: resolve the dns server only from resolv.conf Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> | 6 个月前 | |
Add DNS cookie support (RFC7873 + RFC9018) (#833) DNS cookies are a simple form of learned mutual authentication supported by most DNS server implementations these days and can help prevent DNS Cache Poisoning attacks for clients and DNS amplification attacks for servers. Fixes #620 Fix By: Brad House (@bradh352) | 6 个月前 | |
Rework WinAFD event code (#811) We've had reports of user-after-free type crashes in Windows cleanup code for the Event Thread. In evaluating the code, it appeared there were some memory leaks on per-connection handles that may have remained open during shutdown, while trying to resolve that it became apparent the methodology chosen may not have been the right one for interfacing with the Windows AFD system as stability issues were seen during this debugging process. Since this system is completely undocumented, there was no clear resolution path other than to switch to the *other* methodology which involves directly opening \Device\Afd, rather than spawning a "peer socket" to use to queue AFD operations. The original methodology chosen more closely resembled what is employed by [libuv](https://github.com/libuv/libuv) and given its widespread use was the reason it was used. The new methodology more closely resembles [wepoll](https://github.com/piscisaureus/wepoll). Its not clear if there are any scalability or performance advantages or disadvantages for either method. They both seem like different ways to do the same thing, but this current way does seem more stable. Fixes #798 Fix By: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Refactor connection handling (#839) Refactor some connection handling to reduce code duplication and to unify the TCP and UDP codepaths a bit more. This will make some future changes easier to make. This also does some structure renaming to better conform with current standards: - struct server_state -> ares_server_t - struct server_connection -> ares_conn_t - struct query -> ares_query_t Authored-by: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Update from 1989 MIT license text to modern MIT license text (#556) ares (and thus c-ares) was originally licensed under the 1989 MIT license text: https://fedoraproject.org/wiki/Licensing:MIT#Old_Style_(no_advertising_without_permission) This change updates the license to the modern MIT license as recognized here: https://opensource.org/license/mit/ care has been taken to ensure correct attributions remain for the authors contained within the copyright headers, and all authors with attributions in the headers have been contacted for approval regarding the change. Any authors which were not able to be contacted, the original copyright maintains, luckily that exists in only a single file ares_parse_caa_reply.c at this time. Please see PR #556 for the documented approvals by each contributor. Fix By: Brad House (@bradh352) | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 | |
Windows UWP (Store) support fix (#845) Because AppVeyor's version of MSVC needed to be patched to build UWP applications: https://developercommunity.visualstudio.com/t/clexe-compiler-error-C1007-when-compili/10486219 We ended up disabling UWP builds in our CI environment. It turns out UWP support had broken in the meantime: https://github.com/microsoft/vcpkg/pull/40213 This PR fixes the build regression and also adds a GitHub action CI workflow for building the UWP app so we can catch this in the future. Fix By: Brad House (@bradh352) | 6 个月前 | |
clang-format | 6 个月前 | |
clang-format | 6 个月前 | |
Clean up header inclusion, simplification (#797) The header inclusion logic in c-ares is hard to follow. Lets try to simplify the way it works to make it easier to understand and less likely to break on new code changes. There's still more work to be done, but this is a good start at simplifying things. Fix By: Brad House (@bradh352) | 6 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 |