-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #53416 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]>
- Loading branch information
1 parent
1988714
commit 3371620
Showing
55 changed files
with
2,709 additions
and
25,185 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,6 @@ Contributing to c-ares | |
To contribute patches to c-ares, please generate a GitHub pull request | ||
and follow these guidelines: | ||
|
||
- Check that the Travis builds are green for your pull request. | ||
- Check that the CI/CD builds are green for your pull request. | ||
- Please update the test suite to add a test case for any new functionality. | ||
- Build the library with `./configure --enable-debug --enable-maintainer-mode` and | ||
ensure there are no new warnings. | ||
|
||
To improve the chances of the c-ares maintainers responding to your request: | ||
|
||
- Also send an email to the mailing list at `[email protected]` describing your change. | ||
- To follow any associated discussion, please subscribe to the [mailing list](http://lists.haxx.se/listinfo/c-ares). | ||
- Build the library on your own machine and ensure there are no new warnings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Developer Notes | ||
=============== | ||
|
||
* The distributed `ares_build.h` in the official release tarballs is only | ||
intended to be used on systems which can also not run the also distributed | ||
`configure` or `CMake` scripts. It is generated as a copy of | ||
`ares_build.h.dist` as can be seen in the code repository. | ||
|
||
* If you check out from git on a non-`configure` or `CMake` platform, you must run | ||
the appropriate `buildconf*` script to set up `ares_build.h` and other local | ||
files before being able to compile the library. There are pre-made makefiles | ||
for a subset of such systems such as Watcom, NMake, and MinGW Makefiles. | ||
|
||
* On systems capable of running the `configure` or `CMake` scripts, the process | ||
will overwrite the distributed `ares_build.h` file with one that is suitable | ||
and specific to the library being configured and built, this new file is | ||
generated from the `ares_build.h.in` and `ares_build.h.cmake` template files. | ||
|
||
* If you intend to distribute an already compiled c-ares library you **MUST** | ||
also distribute along with it the generated `ares_build.h` which has been | ||
used to compile it. Otherwise, the library will be of no use for the users of | ||
the library that you have built. It is **your** responsibility to provide this | ||
file. No one at the c-ares project can know how you have built the library. | ||
The generated file includes platform and configuration dependent info, | ||
and must not be modified by anyone. | ||
|
||
* We support both the AutoTools `configure` based build system as well as the | ||
`CMake` build system. Any new code changes must work with both. | ||
|
||
* The files that get compiled and are present in the distribution are referenced | ||
in the `Makefile.inc` in the current directory. This file gets included in | ||
every build system supported by c-ares so that the list of files doesn't need | ||
to be maintained per build system. Don't forget to reference new header files | ||
otherwise they won't be included in the official release tarballs. | ||
|
||
* We cannot assume anything else but very basic C89 compiler features being | ||
present. The lone exception is the requirement for 64bit integers which is | ||
not a requirement for C89 compilers to support. Please do not use any extended | ||
features released by later standards. | ||
|
||
* Newlines must remain unix-style for older compilers' sake. | ||
|
||
* Comments must be written in the old-style `/* unnested C-fashion */` | ||
|
||
* Try to keep line lengths below 80 columns and formatted as the existing code. | ||
There is a `.clang-format` in the repository that can be used to run the | ||
automated code formatter as such: `clang-format -i */*.c */*.h */*/*.c */*/*.h` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,58 +8,94 @@ | |
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=c-ares_c-ares&metric=bugs)](https://sonarcloud.io/summary/new_code?id=c-ares_c-ares) | ||
[![Coverity Scan Status](https://scan.coverity.com/projects/c-ares/badge.svg)](https://scan.coverity.com/projects/c-ares) | ||
|
||
This is c-ares, an asynchronous resolver library. It is intended for | ||
## Overview | ||
[c-ares](https://c-ares.org) is a modern DNS (stub) resolver library, written in | ||
C. It provides interfaces for asynchronous queries while trying to abstract the | ||
intricacies of the underlying DNS protocol. It was originally intended for | ||
applications which need to perform DNS queries without blocking, or need to | ||
perform multiple DNS queries in parallel. The primary examples of such | ||
applications are servers which communicate with multiple clients and programs | ||
with graphical user interfaces. | ||
perform multiple DNS queries in parallel. | ||
|
||
The full source code is available in the ['c-ares' release archives](https://c-ares.org/download/), | ||
and in a git repository: https://github.com/c-ares/c-ares. See the | ||
[INSTALL.md](INSTALL.md) file for build information. | ||
One of the goals of c-ares is to be a better DNS resolver than is provided by | ||
your system, regardless of which system you use. We recommend using | ||
the c-ares library in all network applications even if the initial goal of | ||
asynchronous resolution is not necessary to your application. | ||
|
||
If you find bugs, correct flaws, have questions or have comments in general in | ||
regard to c-ares (or by all means the original ares too), get in touch with us | ||
on the c-ares mailing list: https://lists.haxx.se/listinfo/c-ares | ||
c-ares will build with any C89 compiler and is [MIT licensed](LICENSE.md), | ||
which makes it suitable for both free and commercial software. c-ares runs on | ||
Linux, FreeBSD, OpenBSD, MacOS, Solaris, AIX, Windows, Android, iOS and many | ||
more operating systems. | ||
|
||
c-ares is distributed under the MIT license. | ||
c-ares has a strong focus on security, implementing safe parsers and data | ||
builders used throughout the code, thus avoiding many of the common pitfalls | ||
of other C libraries. Through automated testing with our extensive testing | ||
framework, c-ares is constantly validated with a range of static and dynamic | ||
analyzers, as well as being constantly fuzzed by [OSS Fuzz](https://github.com/google/oss-fuzz). | ||
|
||
You'll find all c-ares details and news here: | ||
https://c-ares.org/ | ||
While c-ares has been around for over 20 years, it has been actively maintained | ||
both in regards to the latest DNS RFCs as well as updated to follow the latest | ||
best practices in regards to C coding standards. | ||
|
||
## Code | ||
|
||
## Notes for c-ares hackers | ||
The full source code and revision history is available in our | ||
[GitHub repository](https://github.com/c-ares/c-ares). Our signed releases | ||
are available in the ['c-ares' release archives](https://c-ares.org/download/). | ||
|
||
* The distributed `ares_build.h` file is only intended to be used on systems | ||
which can not run the also distributed configure script. | ||
|
||
* The distributed `ares_build.h` file is generated as a copy of `ares_build.h.dist` | ||
when the c-ares source code distribution archive file is originally created. | ||
See the [INSTALL.md](INSTALL.md) file for build information. | ||
|
||
* If you check out from git on a non-configure platform, you must run the | ||
appropriate `buildconf*` script to set up `ares_build.h` and other local files | ||
before being able to compile the library. | ||
## Communication | ||
|
||
* On systems capable of running the `configure` script, the `configure` process | ||
will overwrite the distributed `ares_build.h` file with one that is suitable | ||
and specific to the library being configured and built, this new file is | ||
generated from the `ares_build.h.in` template file. | ||
**Issues** and **Feature Requests** should be reported to our | ||
[GitHub Issues](https://github.com/c-ares/c-ares/issues) page. | ||
|
||
* If you intend to distribute an already compiled c-ares library you **MUST** | ||
also distribute along with it the generated `ares_build.h` which has been | ||
used to compile it. Otherwise, the library will be of no use for the users of | ||
the library that you have built. It is **your** responsibility to provide this | ||
file. No one at the c-ares project can know how you have built the library. | ||
**Discussions** around c-ares and its use, are held on | ||
[GitHub Discussions](https://github.com/c-ares/c-ares/discussions/categories/q-a) | ||
or the [Mailing List](https://lists.haxx.se/mailman/listinfo/c-ares). Mailing | ||
List archive [here](https://lists.haxx.se/pipermail/c-ares/). | ||
Please, do not mail volunteers privately about c-ares. | ||
|
||
* File `ares_build.h` includes platform and configuration dependent info, | ||
and must not be modified by anyone. Configure script generates it for you. | ||
**Security vulnerabilities** are treated according to our | ||
[Security Procedure](SECURITY.md), please email c-ares-security at | ||
haxx.se if you suspect one. | ||
|
||
* We cannot assume anything else but very basic compiler features being | ||
present. While c-ares requires an ANSI C compiler to build, some of the | ||
earlier ANSI compilers clearly can't deal with some preprocessor operators. | ||
|
||
* Newlines must remain unix-style for older compilers' sake. | ||
## Release keys | ||
|
||
* Comments must be written in the old-style /* unnested C-fashion */ | ||
Primary GPG keys for c-ares Releasers (some Releasers sign with subkeys): | ||
|
||
* Try to keep line lengths below 80 columns. | ||
* **Daniel Stenberg** <<[email protected]>> | ||
`27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2` | ||
* **Brad House** <<[email protected]>> | ||
`DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA` | ||
|
||
To import the full set of trusted release keys (including subkeys possibly used | ||
to sign releases): | ||
|
||
```bash | ||
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 # Daniel Stenberg | ||
gpg --keyserver hkps://keys.openpgp.org --recv-keys DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA # Brad House | ||
``` | ||
|
||
### Verifying signatures | ||
|
||
For each release `c-ares-X.Y.Z.tar.gz` there is a corresponding | ||
`c-ares-X.Y.Z.tar.gz.asc` file which contains the detached signature for the | ||
release. | ||
|
||
After fetching all of the possible valid signing keys and loading into your | ||
keychain as per the prior section, you can simply run the command below on | ||
the downloaded package and detached signature: | ||
|
||
```bash | ||
% gpg -v --verify c-ares-1.29.0.tar.gz.asc c-ares-1.29.0.tar.gz | ||
gpg: enabled compatibility flags: | ||
gpg: Signature made Fri May 24 02:50:38 2024 EDT | ||
gpg: using RSA key 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 | ||
gpg: using pgp trust model | ||
gpg: Good signature from "Daniel Stenberg <[email protected]>" [unknown] | ||
gpg: WARNING: This key is not certified with a trusted signature! | ||
gpg: There is no indication that the signature belongs to the owner. | ||
Primary key fingerprint: 27ED EAF2 2F3A BCEB 50DB 9A12 5CC9 08FD B71E 12C2 | ||
gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,33 @@ | ||
## c-ares version 1.29.0 - May 24 2024 | ||
## c-ares version 1.30.0 - June 7 2024 | ||
|
||
This is a feature and bugfix release. | ||
This is a maintenance and bugfix release. | ||
|
||
Features: | ||
|
||
* When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration | ||
when network conditions change. [PR #759](https://github.com/c-ares/c-ares/pull/759) | ||
* Apple: reimplement DNS configuration reading to more accurately pull DNS | ||
settings. [PR #750](https://github.com/c-ares/c-ares/pull/750) | ||
* Add observability into DNS server health via a server state callback, invoked | ||
whenever a query finishes. [PR #744](https://github.com/c-ares/c-ares/pull/744) | ||
* Add server failover retry behavior, where failed servers are retried with | ||
small probability after a minimum delay. [PR #731](https://github.com/c-ares/c-ares/pull/731) | ||
* Basic support for SIG RR record (RFC 2931 / RFC 2535) [PR #773](https://github.com/c-ares/c-ares/pull/773) | ||
|
||
Changes: | ||
|
||
* Mark `ares_channel_t *` as const in more places in the public API. [PR #758](https://github.com/c-ares/c-ares/pull/758) | ||
* Validation that DNS strings can only consist of printable ascii characters | ||
otherwise will trigger a parse failure. | ||
[75de16c](https://github.com/c-ares/c-ares/commit/75de16c) and | ||
[40fb125](https://github.com/c-ares/c-ares/commit/40fb125) | ||
* Windows: use `GetTickCount64()` for a monotonic timer that does not wrap. [1dff8f6](https://github.com/c-ares/c-ares/commit/1dff8f6) | ||
|
||
Bugfixes: | ||
|
||
* Due to a logic flaw dns name compression writing was not properly implemented | ||
which would result in the name prefix not being written for a partial match. | ||
This could cause issues in various record types such as MX records when using | ||
the deprecated API. Regression introduced in 1.28.0. [Issue #757](https://github.com/c-ares/c-ares/issues/757) | ||
* Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and | ||
causes c-ares to become non-functional. [PR #754](https://github.com/c-ares/c-ares/pull/754) | ||
* `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752](https://github.com/c-ares/c-ares/issues/752) | ||
* cmake: Android requires C99. [PR #748](https://github.com/c-ares/c-ares/pull/748) | ||
* `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742](https://github.com/c-ares/c-ares/pull/742) | ||
* QueryCache: Fix issue where purging on server changes wasn't working. [a6c8fe6](https://github.com/c-ares/c-ares/commit/a6c8fe6) | ||
* Windows: Fix Y2K38 issue by creating our own `ares_timeval_t` datatype. [PR #772](https://github.com/c-ares/c-ares/pull/772) | ||
* Fix packaging issue affecting MacOS due to a missing header. [55afad6](https://github.com/c-ares/c-ares/commit/55afad6) | ||
* MacOS: Fix UBSAN warnings that are likely meaningless due to alignment issues | ||
in new MacOS config reader. | ||
* Android: arm 32bit build failure due to missing symbol. [d1722e6](https://github.com/c-ares/c-ares/commit/d1722e6) | ||
|
||
Thanks go to these friendly people for their efforts and contributions for this | ||
release: | ||
|
||
* Brad House (@bradh352) | ||
* Daniel Stenberg (@bagder) | ||
* David Hotham (@dimbleby) | ||
* Jiwoo Park (@jimmy-park) | ||
* Oliver Welsh (@oliverwelsh) | ||
* Volker Schlecht (@VlkrS) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.