Oopenvela-robotAdd DNS cookie support (RFC7873 + RFC9018) (#833)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
provide SPDX identifiers and a REUSE CI job to verify All files have their licence and copyright information clearly identifiable. If not in the file header, they are set separately in .reuse/dep5. All used license texts are provided in LICENSES/ | 6 个月前 | |
remove acountry from built tools as nerd.dk is gone (#554) The acountry utility required a third party DNSBL service from nerd.dk in order to operate. That service has been offline for about a year and there is no other comparable service offering. We are keeping the code in the repository as an example, but no longer building it. Fixes: #537 Fix By: Brad House (@bradh352) | 6 个月前 | |
man: ares_dns_record_set_id() Add missing manpage Fixes #817 Fix By: Brad House (@bradh352) | 6 个月前 | |
| 6 个月前 | ||
| 6 个月前 | ||
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
DNS RR TXT strings should not be automatically concatenated (#801) As per #738, there are usecases where the DNS TXT record strings should not be concatenated like RFC 7208 indicates. We cannot break ABI with those using the new API, so we need to support retrieving the concatenated version as well as a new API to retrieve the individual strings which will be used by ares_parse_text_reply_ext() to restore the old behavior prior to c-ares 1.20. Fixes Issue: #738 Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
man: ares_dns_record_set_id() Add missing manpage Fixes #817 Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Rework internals to pass around ares_dns_record_t instead of binary data (#730) c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Rework internals to pass around ares_dns_record_t instead of binary data (#730) c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally. Fix By: Brad House (@bradh352) | 6 个月前 | |
Rework internals to pass around ares_dns_record_t instead of binary data (#730) c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add function ares_search_dnrec() to search for records using the new DNS record parser (#719) This PR adds a new function ares_search_dnsrec() to search for records using the new DNS record parser. The function takes an arbitrary DNS record object to search (that must represent a query for a single name). The function takes a new callback type, ares_callback_dnsrec, that is invoked with a parsed DNS record object rather than the raw buffer(+length). The original motivation for this change is to provide support for [draft-kaplan-enum-sip-routing-04](https://datatracker.ietf.org/doc/html/draft-kaplan-enum-sip-routing-04); when routing phone calls using an ENUM server, it can be useful to include identifying source information in an OPT RR options value, to help select the appropriate route for the call. The new function allows for more customisable searches like this. **Summary of code changes** A new function ares_search_dnsrec() has been added and exposed. Moreover, the entire ares_search_int() internal code flow has been refactored to use parsed DNS record objects and the new DNS record parser. The DNS record object is passed through the search_query structure by encoding/decoding to/from a buffer (if multiple search domains are used). A helper function ares_dns_write_query_altname() is used to re-write the DNS record object with a new query name (used to append search domains). ares_search() is now a wrapper around the new internal code, where the DNS record object is created based on the name, class and type parameters. The new function uses a new callback type, ares_callback_dnsrec. This is invoked with a parsed DNS record object. For now, we convert from ares_callback to this new type using ares__dnsrec_convert_cb(). Some functions that are common to both ares_query() and ares_search() have been refactored using the new DNS record parser. See ares_dns_record_create_query() and ares_dns_query_reply_tostatus(). **Testing** A new FV has been added to test the new function, which searches for a DNS record containing an OPT RR with custom options value. As part of this, I needed to enhance the mock DNS server to expect request text (and assert that it matches actual request text). This is because the FV needs to check that the request contains the correct OPT RR. **Documentation** The man page docs have been updated to describe the new feature. **Futures** In the future, a new variant of ares_send() could be introduced in the same vein (ares_send_dnsrec()). This could be used by ares_search_dnsrec(). Moreover, we could migrate internal code to use ares_callback_dnsrec as the default callback. This will help to make the new DNS record parser the norm in C-Ares. --------- Co-authored-by: Oliver Welsh (@oliverwelsh) | 6 个月前 | |
man: ares_dns_record_set_id() Add missing manpage Fixes #817 Fix By: Brad House (@bradh352) | 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 个月前 | |
DNS RR TXT strings should not be automatically concatenated (#801) As per #738, there are usecases where the DNS TXT record strings should not be concatenated like RFC 7208 indicates. We cannot break ABI with those using the new API, so we need to support retrieving the concatenated version as well as a new API to retrieve the individual strings which will be used by ares_parse_text_reply_ext() to restore the old behavior prior to c-ares 1.20. Fixes Issue: #738 Fix By: Brad House (@bradh352) | 6 个月前 | |
DNS RR TXT strings should not be automatically concatenated (#801) As per #738, there are usecases where the DNS TXT record strings should not be concatenated like RFC 7208 indicates. We cannot break ABI with those using the new API, so we need to support retrieving the concatenated version as well as a new API to retrieve the individual strings which will be used by ares_parse_text_reply_ext() to restore the old behavior prior to c-ares 1.20. Fixes Issue: #738 Fix By: Brad House (@bradh352) | 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 个月前 | |
DNS RR TXT strings should not be automatically concatenated (#801) As per #738, there are usecases where the DNS TXT record strings should not be concatenated like RFC 7208 indicates. We cannot break ABI with those using the new API, so we need to support retrieving the concatenated version as well as a new API to retrieve the individual strings which will be used by ares_parse_text_reply_ext() to restore the old behavior prior to c-ares 1.20. Fixes Issue: #738 Fix By: Brad House (@bradh352) | 6 个月前 | |
DNS RR TXT strings should not be automatically concatenated (#801) As per #738, there are usecases where the DNS TXT record strings should not be concatenated like RFC 7208 indicates. We cannot break ABI with those using the new API, so we need to support retrieving the concatenated version as well as a new API to retrieve the individual strings which will be used by ares_parse_text_reply_ext() to restore the old behavior prior to c-ares 1.20. Fixes Issue: #738 Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
Support ipv6 link-local servers and %iface syntax (#646) Some environments may send router advertisements on a link setting their link-local (fe80::/10) address as a valid DNS server to the remote system. This will cause a DNS entry to be created like fe80::1%iface, since all link-local network interfaces are technically part of the same /10 subnet, it must be told what interface to send packets through explicitly if there are multiple physical interfaces. This PR adds support for the %iface modifier when setting DNS servers via /etc/resolv.conf as well as via ares_set_servers_csv(). For MacOS and iOS it is assumed that libresolve will set the sin6_scope_id and should be supported, but my test systems don't seem to read the Router Advertisement for RDNSS link-local. Specifying the link-local dns server on MacOS via adig has been tested and confirmed working. For Windows, this is similar to MacOS in that the system doesn't seem to honor the RDNSS RA, but specifying manually has been tested to work. At this point, Android support does not exist. Fixes Bug #462 Supersedes PR #463 Fix By: Brad House (@bradh352) and Serhii Purik (@sergvpurik) | 6 个月前 | |
provide SPDX identifiers and a REUSE CI job to verify All files have their licence and copyright information clearly identifiable. If not in the file header, they are set separately in .reuse/dep5. All used license texts are provided in LICENSES/ | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Query Cache support (#625) This PR implements a query cache at the lowest possible level, the actual dns request and response messages. Only successful and NXDOMAIN responses are cached. The lowest TTL in the response message determines the cache validity period for the response, and is capped at the configuration value for qcache_max_ttl. For NXDOMAIN responses, the SOA record is evaluated. For a query to match the cache, the opcode, flags, and each question's class, type, and name are all evaluated. This is to prevent matching a cached entry for a subtly different query (such as if the RD flag is set on one request and not another). For things like ares_getaddrinfo() or ares_search() that may spawn multiple queries, each individual message received is cached rather than the overarching response. This makes it possible for one query in the sequence to be purged from the cache while others still return cached results which means there is no chance of ever returning stale data. We have had a lot of user requests to return TTLs on all the various parsers like ares_parse_caa_reply(), and likely this is because they want to implement caching mechanisms of their own, thus this PR should solve those issues as well. Due to the internal data structures we have these days, this PR is less than 500 lines of new code. Fixes #608 Fix By: Brad House (@bradh352) | 6 个月前 | |
DNS 0x20 implementation (#800) This PR enables DNS 0x20 as per https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00 . DNS 0x20 adds additional entropy to the request by randomly altering the case of the DNS question to help prevent cache poisoning attacks. Google DNS has implemented this support as of 2023, even though this is a proposed and expired standard from 2008: https://groups.google.com/g/public-dns-discuss/c/KxIDPOydA5M There have been documented cases of name server and caching server non-conformance, though it is expected to become more rare, especially since Google has started using this. This can be enabled via the ARES_FLAG_DNS0x20 flag, which is currently disabled by default. The test cases do however enable this flag to validate this feature. Implementors using this flag will notice that responses will retain the mixed case, but since DNS names are case-insensitive, any proper implementation should not be impacted. There is currently no fallback mechanism implemented as it isn't immediately clear how this may affect a stub resolver like c-ares where we aren't querying the authoritative name server, but instead an intermediate recursive resolver where some domains may return invalid results while others return valid results, all while querying the same nameserver. Likely using DNS cookies as suggested by #620 is a better mechanism to fight cache poisoning attacks for stub resolvers. TCP queries do not use this feature even if the ARES_FLAG_DNS0x20 flag is specified since they are not subject to cache poisoning attacks. Fixes Issue: #795 Fix By: Brad House (@bradh352) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
remove outdated copyright text | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
remove outdated copyright text | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Rework internals to pass around ares_dns_record_t instead of binary data (#730) c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally. Fix By: Brad House (@bradh352) | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
Add ares_queue_active_queries() (#712) Add a function to request the number of active queries from an ares channel. This will return the number of inflight requests to dns servers. Some functions like ares_getaddrinfo() when using AF_UNSPEC may enqueue multiple queries which will be reflected in this count. In the future, if we implement support for queuing (e.g. for throttling purposes), and/or implement support for tracking user-requested queries (e.g. for cancelation), we can provide additional functions for inspecting those queues. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add ares_queue_active_queries() (#712) Add a function to request the number of active queries from an ares channel. This will return the number of inflight requests to dns servers. Some functions like ares_getaddrinfo() when using AF_UNSPEC may enqueue multiple queries which will be reflected in this count. In the future, if we implement support for queuing (e.g. for throttling purposes), and/or implement support for tracking user-requested queries (e.g. for cancelation), we can provide additional functions for inspecting those queues. Fix By: Brad House (@bradh352) | 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 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Add function ares_search_dnrec() to search for records using the new DNS record parser (#719) This PR adds a new function ares_search_dnsrec() to search for records using the new DNS record parser. The function takes an arbitrary DNS record object to search (that must represent a query for a single name). The function takes a new callback type, ares_callback_dnsrec, that is invoked with a parsed DNS record object rather than the raw buffer(+length). The original motivation for this change is to provide support for [draft-kaplan-enum-sip-routing-04](https://datatracker.ietf.org/doc/html/draft-kaplan-enum-sip-routing-04); when routing phone calls using an ENUM server, it can be useful to include identifying source information in an OPT RR options value, to help select the appropriate route for the call. The new function allows for more customisable searches like this. **Summary of code changes** A new function ares_search_dnsrec() has been added and exposed. Moreover, the entire ares_search_int() internal code flow has been refactored to use parsed DNS record objects and the new DNS record parser. The DNS record object is passed through the search_query structure by encoding/decoding to/from a buffer (if multiple search domains are used). A helper function ares_dns_write_query_altname() is used to re-write the DNS record object with a new query name (used to append search domains). ares_search() is now a wrapper around the new internal code, where the DNS record object is created based on the name, class and type parameters. The new function uses a new callback type, ares_callback_dnsrec. This is invoked with a parsed DNS record object. For now, we convert from ares_callback to this new type using ares__dnsrec_convert_cb(). Some functions that are common to both ares_query() and ares_search() have been refactored using the new DNS record parser. See ares_dns_record_create_query() and ares_dns_query_reply_tostatus(). **Testing** A new FV has been added to test the new function, which searches for a DNS record containing an OPT RR with custom options value. As part of this, I needed to enhance the mock DNS server to expect request text (and assert that it matches actual request text). This is because the FV needs to check that the request contains the correct OPT RR. **Documentation** The man page docs have been updated to describe the new feature. **Futures** In the future, a new variant of ares_send() could be introduced in the same vein (ares_send_dnsrec()). This could be used by ares_search_dnsrec(). Moreover, we could migrate internal code to use ares_callback_dnsrec as the default callback. This will help to make the new DNS record parser the norm in C-Ares. --------- Co-authored-by: Oliver Welsh (@oliverwelsh) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Rework internals to pass around ares_dns_record_t instead of binary data (#730) c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally. Fix By: Brad House (@bradh352) | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
add missing copyrights | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
provide SPDX identifiers and a REUSE CI job to verify All files have their licence and copyright information clearly identifiable. If not in the file header, they are set separately in .reuse/dep5. All used license texts are provided in LICENSES/ | 6 个月前 | |
provide SPDX identifiers and a REUSE CI job to verify All files have their licence and copyright information clearly identifiable. If not in the file header, they are set separately in .reuse/dep5. All used license texts are provided in LICENSES/ | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
remove outdated copyright text | 6 个月前 | |
manpage: remove AUTHOR section The current best practices consider the AUTHOR section to be deprecated and recommend removing such a section. | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
add missing copyrights | 6 个月前 | |
const is fine on ares__channel_[un]lock (#758) at https://github.com/c-ares/c-ares/pull/601#issuecomment-1801935063 you chose not to scatter const on the public interface because of the plan - now realised - to add threading to c-ares, and in the expectation that even read operations would need to lock the mutex. But the threading implementation has a _pointer_ to a mutex inside the ares channel and as I understand it, that means that it is just fine to mark ares__channel_lock (and ares__channel_unlock) as taking a const channel. It is the pointed-to mutex that is not constant, but C does not propagate const-ness through pointers. This PR sprinkles const where appropriate on public interfaces. Fix By: David Hotham (@dimbleby) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
Add DNS record manpages (#615) The new DNS record parser and writer needs manpages. This PR implements those. Fix By: Brad House (@bradh352) | 6 个月前 | |
remove outdated copyright text | 6 个月前 |