summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/res_send_async.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* correctly handle read(2) return value.eric2019-09-281-3/+10
| | | | | | fix issue reported by Mikolaj Kucharski. ok martijn@ deraadt@
* Unbreak tree. Last minute changes are evil.otto2019-01-141-2/+2
|
* There are cases where a program doing dns requests wants to set theotto2019-01-141-1/+3
| | | | | Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
* use recallocarray to resize buffer - ensures that detritus from previousderaadt2017-03-151-2/+2
| | | | | lookups isn't left lying around the address space. ok eric
* don't need to handle the malloc case special, since realloc worksderaadt2017-03-141-9/+1
| | | | | with NULL ok eric
* Add support for RES_USE_DNSSECjca2017-02-271-4/+5
| | | | | | | | | | | | RES_USE_DNSSEC is implemented by setting the DNSSEC DO bit in outgoing queries. The resolver is then supposed to set the AD bit in the reply if it managed to validate the answer through DNSSEC. Useful when the application doesn't implement validation internally. This scheme assumes that the validating resolver is trusted and that the communication channel between the validating resolver and and the client is secure. ok eric@ gilles@
* Put a common flags field in the query struct, rather than in somejca2017-02-271-3/+3
| | | | | | | | | elements of the union. This field is for internal asr flags. The flags in "struct rrset" and "struct ni" are different kinds of flags. ok eric@
* Use more specific error codes for invalid packets.eric2017-02-181-4/+15
| | | | | | | | In particular, truncated packets without the TC flag set (non-compliant server sending too large packets) now fail with EOVERFLOW instead of EINVAL, so the TCP fallback mechanism can work. feedback and ok krw@ jca@ benno@
* Add EDNS0 support.jca2017-02-181-3/+5
| | | | | | | EDNS allows for various DNS extensions, among which UDP DNS packets size bigger than 512 bytes. The default is still to not advertize anything. ok eric@
* Increase UDP packet buffer to 4096 bytes from 512. There are some reallykrw2017-02-171-2/+4
| | | | | | | | | | broken DNS servers out there that send packets >512 bytes w/o even the courtesy of trying to use EDNS0. A partial workaround as more complete packet parsing solutions are worked on. ok jca@ eric@
* Switch to using SOCK_DNS flag, rather than the dnssocket() andderaadt2015-10-231-3/+4
| | | | | | dnssonnect() calls. Be a bit careful crossing over this, need a kernel no older than Monday. ok guenther tedu semarie
* libc DNS functions will now use the new dnssocket() / dnsconnect()deraadt2015-10-181-3/+3
| | | | | | | | | | | system calls. These signal to the pledge kernel code that a DNS transaction is happening. These special sockets only work well with port 53 (there are some cute plans...). Programs calling pledge "inet" will not work! You need pledge "dns", and of course, you need a fairly fresh kernel. ok guenther kettenis tedu
* remove bogus includes of err.heric2015-09-201-2/+1
|
* Wrap <asr.h> so internal calls go direct and all the symbols are weakguenther2015-09-141-1/+3
|
* Hide all unnecessary asr / resolver related API with _ prefixes.deraadt2015-09-091-27/+27
| | | | direction & ok guenther
* Use SOCK_NONBLOCK in a couple more placesguenther2015-09-091-11/+3
| | | | ok deraadt@
* Rename print_sockaddr() to avoid symbol visibility problemsjca2015-06-201-3/+3
| | | | | | print_sockaddr is internal to asr, and conflicts with ports/net/samba4. ok eric@
* Make the asr API public. Install asr.h to /usr/include.h and manpages.eric2014-03-261-2/+4
| | | | | | Include tweaks suggested by mpi@ ok deraadt@
* Cleanup and simplify the API to be exposed. Use better names foreric2014-03-251-35/+34
| | | | | | structures, functions and defines. discussed with and ok deraadt@ guenther@
* prefix structure names to avoid ambiguity and possible collisions wheneric2014-03-141-15/+15
| | | | | | the API gets public. ok deraadt@
* Make some symbols static and prefix all visible symbols with asr_eric2013-07-121-22/+22
| | | | | | to prevent collisions with third-party programs. suggested by sthen@, ok theo@
* iterating over the ns list only matters for res_send_async.c, so moveeric2013-06-011-3/+32
| | | | things around.
* Do not take external buffers for storing DNS responses in the internaleric2013-04-301-48/+13
| | | | | async API. That is actually useless and it makes the code more complicated. The required buffers are always allocated when needed.
* spacingderaadt2013-04-141-2/+2
|
* do not fail on EINTReric2013-04-051-4/+16
| | | | suggested by deraadt@
* Use MSG_NOSIGNAL when writing DNS queries over TCP sockets to ensurematthew2013-04-031-2/+7
| | | | | | we don't trigger SIGPIPE. ok millert
* add comment for how EINPROGRESS is handled there.eric2013-04-021-1/+6
|
* better implementation for tcp_read() that can get the packet length ineric2013-04-021-22/+33
| | | | | | multiple read. prodded by deraadt@
* space cleanup; ok ericderaadt2013-04-011-2/+2
|
* space cleanup; ok ericderaadt2013-04-011-2/+2
|
* simpler and saner implementation for tcp_write(). now fully handleseric2013-04-011-38/+15
| | | | | | short writes. prodded by deraadt@
* Principle of least astonishment: implement nameserver retry/backoff aseric2013-03-311-5/+1
| | | | in the former resolver.
* Only use the search domains for DNS lookups, as the current resolver does.eric2013-03-271-2/+2
| | | | | Better not diverge too much in behavior at this point. Typo fix and doc update while there.
* knferic2012-11-241-7/+6
|
* make separate structures for pack and unpackeric2012-11-241-7/+7
|
* cleanup asr_debug.ceric2012-09-091-3/+3
|
* use proper macros for debug traces.eric2012-09-091-65/+25
|
* rename function to avoid symbol clasheric2012-07-071-6/+3
|
* Import asr, an experimental async resolver implementation.eric2012-04-141-0/+809
The idea is to eventually replace the existing resolver with something better. Time to start working on it in tree. ok deraadt@