summaryrefslogtreecommitdiff
path: root/lib/libc/asr
AgeCommit message (Collapse)Author
2014-03-14prefix structure names to avoid ambiguity and possible collisions whenEric Faurot
the API gets public. ok deraadt@
2014-03-03fix support for HOSTALIASES.Eric Faurot
reported by tedu@ ok tedu@ deraadt@
2014-02-26need more #include files for resolv.h, for the non-YP case, which happensTheo de Raadt
on the install media... ok eric
2014-02-26Do not restrict chars in dname during label expansion, but validate resultingEric Faurot
hostnames before returning them to the caller. ok deraadt@
2014-02-24make res_search() report NO_DATA instead of HOST_NOT_FOUND in some cases.Eric Faurot
issue reported by matthieu@ ok matthieu@ deraadt@
2014-02-17Better search strategy for getaddrinfo. The address family loop mustEric Faurot
be done "inside" the search domain loop, not the other way round.
2014-02-17report extra PTR records as aliasesEric Faurot
2014-01-15Initialise _res.nsaddr_list in res_init(), fixing some programs which dependStuart Henderson
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@.
2013-11-24most obvious unsigned char casts for ctypeTheo de Raadt
ok jca krw ingo
2013-11-12pull in missing includes (math.h, unistd.h, stdlib.h) needed forTheo de Raadt
prototypes
2013-08-08sync with recent name changes;Jason McIntyre
2013-07-17missing symbol rename.Eric Faurot
2013-07-12Make some symbols static and prefix all visible symbols with asr_Eric Faurot
to prevent collisions with third-party programs. suggested by sthen@, ok theo@
2013-06-05Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzeTed Unangst
2013-06-01Move search domain iteration code in res_search_async.c where it belongs.Eric Faurot
2013-06-01Make hostaliases work for gethostbyname() and getaddrinfo() whenEric Faurot
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().
2013-06-01Update asr_hostaliases() to make all necessary checks in the function.Eric Faurot
Explicitely check for issetguid() before calling getenv(). Also make asr_hostalias() callable from other parts of asr too.
2013-06-01iterating over the ns list only matters for res_send_async.c, so moveEric Faurot
things around.
2013-05-29use paramaters instead of static storage in _gethostbyname()Eric Faurot
2013-05-27Add minimal support for _res setup and update.Eric Faurot
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@
2013-04-30various small fixes;Jason McIntyre
2013-04-30Do not take external buffers for storing DNS responses in the internalEric Faurot
async API. That is actually useless and it makes the code more complicated. The required buffers are always allocated when needed.
2013-04-30copy input flags in result addrinfo structures.Eric Faurot
2013-04-17check return value of strdup(), fix mem leak in error path and takeOtto Moerbeek
into account that asr_use_resolver() can return NULL; ok tedu@ eric@
2013-04-17give a timespec a name that is easier to verifyTheo de Raadt
2013-04-14spacingTheo de Raadt
2013-04-11Proper access of _THREAD_PRIVATE storage. Avoids a mem leak and reinitOtto Moerbeek
of resolver context for each resolver call for single threaded programs. With and ok tedu@ ok eric@
2013-04-09show what we parsed in debug output; ok guether@Otto Moerbeek
2013-04-08Do not fail if the user buffer is too short to hold the packet: fill it upEric Faurot
to the given size and return the packet length. issue spotted by weerd@
2013-04-08Comply with rfc2553. lib/libc/net/getaddrinfo.c already has this right.Christopher Zimmermann
This fixes hostname resolution for OpenVPN 2.3.1. ok eric@.
2013-04-05do not fail on EINTREric Faurot
suggested by deraadt@
2013-04-04fix alignment issue in getnetby{addr,name}() too.Eric Faurot
2013-04-04use the provided ALIGN() macro instead of re-inventing a square wheel.Eric Faurot
prodded by deraadt@
2013-04-03properly follow the CNAME chain in reverse lookupsEric Faurot
spotted by sthen@
2013-04-03Use MSG_NOSIGNAL when writing DNS queries over TCP sockets to ensureMatthew Dempsky
we don't trigger SIGPIPE. ok millert
2013-04-02add comment for how EINPROGRESS is handled there.Eric Faurot
2013-04-02make sure we always point before the current offset.Eric Faurot
spotted by matthew@
2013-04-02better implementation for tcp_read() that can get the packet length inEric Faurot
multiple read. prodded by deraadt@
2013-04-01If more than one lookup line is found in resolv.conf, the latest oneEric Faurot
takes precedence. Simplify code while there. suggested by deraadt@
2013-04-01properly check for domain name truncation at various places and failEric Faurot
if that happens. prodded by deraadt@
2013-04-01space cleanup; ok ericTheo de Raadt
2013-04-01space cleanup; ok ericTheo de Raadt
2013-04-01rename fieldEric Faurot
2013-04-01simpler and saner implementation for tcp_write(). now fully handlesEric Faurot
short writes. prodded by deraadt@
2013-04-01fix alignment issue in the structure filled by gethostby{name,addr}()Eric Faurot
spotted by naddy@
2013-03-31Principle of least astonishment: implement nameserver retry/backoff asEric Faurot
in the former resolver.
2013-03-30allow "0" as service name for raw sockets.Eric Faurot
ok sthen@ bluhm@
2013-03-30Do not assume local nameserver if resolv.conf doesn't exist, just useEric Faurot
/etc/hosts. discussed with deraadt@
2013-03-30don't ever skip reload the very first time; detective work by rpe@; ok eric@Otto Moerbeek
2013-03-29properly handle scope when parsing IPv6 addresses.Eric Faurot
ok bluhm@ naddy@ sthen@