summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Initialise _res.nsaddr_list in res_init(), fixing some programs which dependsthen2014-01-151-1/+6
| | | | | | | on bind resolver internals. Note, the list will not be updated if resolv.conf is changed while the program runs unless the caller resets the RES_INIT flag. Approach suggested by otto@, original diff from Kapetanakis Giannis, fix suggested by tedu@ and dug up again by Riccardo Mottola. Looks ok to eric@.
* most obvious unsigned char casts for ctypederaadt2013-11-242-4/+5
| | | | ok jca krw ingo
* pull in missing includes (math.h, unistd.h, stdlib.h) needed forderaadt2013-11-122-2/+4
| | | | prototypes
* sync with recent name changes;jmc2013-08-082-20/+19
|
* missing symbol rename.eric2013-07-171-2/+2
|
* Make some symbols static and prefix all visible symbols with asr_eric2013-07-1221-250/+246
| | | | | | to prevent collisions with third-party programs. suggested by sthen@, ok theo@
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-3/+3
|
* Move search domain iteration code in res_search_async.c where it belongs.eric2013-06-013-112/+118
|
* Make hostaliases work for gethostbyname() and getaddrinfo() wheneric2013-06-015-38/+40
| | | | | | looking into /etc/hosts. Remove the alias check from the search domain iteration. Instead, take a shortcut to res_query_async_ctx() in res_search_async_ctx().
* Update asr_hostaliases() to make all necessary checks in the function.eric2013-06-012-14/+14
| | | | | Explicitely check for issetguid() before calling getenv(). Also make asr_hostalias() callable from other parts of asr too.
* iterating over the ns list only matters for res_send_async.c, so moveeric2013-06-013-39/+37
| | | | things around.
* use paramaters instead of static storage in _gethostbyname()eric2013-05-291-26/+48
|
* Add minimal support for _res setup and update.eric2013-05-2711-45/+93
| | | | | | | | Change res_init() to initialize the _res structure on first call, and udpate the global async context if changes were made by the user. All resolver functions now call res_init() internally. fixes issue spotted by otto@
* various small fixes;jmc2013-04-301-4/+5
|
* Do not take external buffers for storing DNS responses in the internaleric2013-04-3012-122/+55
| | | | | async API. That is actually useless and it makes the code more complicated. The required buffers are always allocated when needed.
* copy input flags in result addrinfo structures.eric2013-04-301-1/+2
|
* check return value of strdup(), fix mem leak in error path and takeotto2013-04-171-10/+17
| | | | into account that asr_use_resolver() can return NULL; ok tedu@ eric@
* give a timespec a name that is easier to verifyderaadt2013-04-171-5/+5
|
* spacingderaadt2013-04-144-8/+8
|
* Proper access of _THREAD_PRIVATE storage. Avoids a mem leak and reinitotto2013-04-111-3/+3
| | | | | of resolver context for each resolver call for single threaded programs. With and ok tedu@ ok eric@
* show what we parsed in debug output; ok guether@otto2013-04-091-2/+2
|
* Do not fail if the user buffer is too short to hold the packet: fill it uperic2013-04-082-5/+26
| | | | | | to the given size and return the packet length. issue spotted by weerd@
* Comply with rfc2553. lib/libc/net/getaddrinfo.c already has this right.chrisz2013-04-081-2/+2
| | | | | | This fixes hostname resolution for OpenVPN 2.3.1. ok eric@.
* do not fail on EINTReric2013-04-051-4/+16
| | | | suggested by deraadt@
* fix alignment issue in getnetby{addr,name}() too.eric2013-04-041-6/+10
|
* use the provided ALIGN() macro instead of re-inventing a square wheel.eric2013-04-041-7/+3
| | | | prodded by deraadt@
* properly follow the CNAME chain in reverse lookupseric2013-04-031-5/+13
| | | | spotted by sthen@
* 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
|
* make sure we always point before the current offset.eric2013-04-021-2/+2
| | | | spotted by matthew@
* better implementation for tcp_read() that can get the packet length ineric2013-04-022-23/+35
| | | | | | multiple read. prodded by deraadt@
* If more than one lookup line is found in resolv.conf, the latest oneeric2013-04-011-18/+9
| | | | | | takes precedence. Simplify code while there. suggested by deraadt@
* properly check for domain name truncation at various places and faileric2013-04-013-20/+30
| | | | | | if that happens. prodded by deraadt@
* space cleanup; ok ericderaadt2013-04-012-4/+4
|
* space cleanup; ok ericderaadt2013-04-0113-72/+72
|
* rename fielderic2013-04-012-6/+6
|
* simpler and saner implementation for tcp_write(). now fully handleseric2013-04-012-40/+16
| | | | | | short writes. prodded by deraadt@
* fix alignment issue in the structure filled by gethostby{name,addr}()eric2013-04-011-10/+23
| | | | spotted by naddy@
* Principle of least astonishment: implement nameserver retry/backoff aseric2013-03-312-8/+10
| | | | in the former resolver.
* allow "0" as service name for raw sockets.eric2013-03-301-2/+2
| | | | ok sthen@ bluhm@
* Do not assume local nameserver if resolv.conf doesn't exist, just useeric2013-03-302-8/+7
| | | | | | /etc/hosts. discussed with deraadt@
* don't ever skip reload the very first time; detective work by rpe@; ok eric@otto2013-03-301-2/+2
|
* properly handle scope when parsing IPv6 addresses.eric2013-03-291-2/+32
| | | | ok bluhm@ naddy@ sthen@
* res_querydomain()'s code to terminate the domain with '.' had the assignmentguenther2013-03-291-2/+2
| | | | | | | flipped so that it always used a domain of ".." Heavy lifting by otto@ ok eric@ otto@ miod@
* correctly show the scope for IPv6 addresses in getnameinfo()eric2013-03-291-4/+27
|
* Do not fail in gethostbyname_async() if there are multiple addresses ineric2013-03-291-3/+3
| | | | a DNS packet...
* accept and use any protocol specified by the caller.eric2013-03-281-14/+10
| | | | issue spotted by naddy@
* explicitely -> explicitly;jmc2013-03-271-2/+2
|
* Only use the search domains for DNS lookups, as the current resolver does.eric2013-03-277-85/+63
| | | | | Better not diverge too much in behavior at this point. Typo fix and doc update while there.
* Allow gethostbyname() to accept a numeric IP string.eric2012-12-171-4/+47
| | | | | | No lookup is done in this case. regression reported by espie@