summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getaddrinfo.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove dead fileseric2013-11-121-1755/+0
| | | | ok deraadt@
* Add AI_FQDN flag to getaddrinfo(3). Prompted by discussions with djm@matthew2011-04-051-19/+17
| | | | | | | | | | about cert checking in OpenSSH. Man page wording tweaks thanks to jmc@. ok henning@, jmc@; positive feedback from djm@, ajacoutat@ Committing now to reuse guenther@'s libc minor bump instead of cranking it again, as suggested by deraadt@.
* More shrinkage, a bit for ramdisks but mostly for static binaries:guenther2009-11-181-1/+3
| | | | | | | | | | | | | | | | | - wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses p_class() and p_type() for diagnostics, then add that define to libstub to avoid pulling in res_debug_syms.o - split rcmd() and ruserok() into separate files, as nothing uses both - split readdir_r() to its own file - split syslog_r() from syslog(), as the latter needs localtime(); many binaries no longer need to pull in all the time code after this; switch from usleep() to nanosleep() while we're at it (The profit of analysis of -Wl,-M,--cref output) Chops 888kB from /bin and /sbin on i386 ok deraadt@, miod@
* make getaddrinfo(3) accept numeric servname when ai_socktype is notfgsch2009-09-021-4/+2
| | | | | specified in hint or hints is NULL. claudio@ ok
* simplify the 'family' option parser and make it more evident what we'repyr2009-06-041-24/+6
| | | | | | now doing. ok deraadt@
* Add a resolv.conf option to specify the order in which getaddrinfopyr2009-06-041-7/+34
| | | | | | | | | | | PF_UNSPEC queries are made. While there change the default from inet6 first then inet4 to inet4 first then inet6, this prevents the many people with IPv4 only connectivity from constantly trying to contact IPv6 addresses, and also unbreaks many ports who don't use getaddrinfo right. ok deraadt@, plenty of cheering in the room wrt the idea, not loud enough complaining from the v6 crowd.
* Typos.ray2007-05-201-3/+3
| | | | OK jmc@.
* Remove no-op code. From tbert.ray2007-05-181-3/+1
| | | | OK moritz@ and jaredy@
* Improve reentrancy by not using global variable. Removes tworay2007-05-171-31/+11
| | | | | | wrappers around fopen/fclose. From tbert. OK millert@, tedu@, and itojun@.
* Use size_t for strlen results.ray2007-05-121-4/+6
| | | | OK moritz@.
* Clean up macros according to style. From tbert <bret dot lambert at gmail>.ray2007-05-121-27/+27
| | | | OK moritz@ and jaredy@.
* Use syslog_r instead of syslog in getaddrinfo. Slowly makingray2007-05-101-4/+9
| | | | | | getaddrinfo reentrant. OK millert@ and deraadt@.
* strlen(3) returns size_t.ray2007-02-181-4/+6
| | | | OK itojun@.
* Remove duplicate code. No functional change.ray2007-02-171-39/+22
| | | | OK itojun@, moritz@, and millert@.
* Remove two mutexes by replacing getservbyname() and getservbyport()ray2007-02-151-9/+8
| | | | | | calls with their reentrant versions. OK millert@.
* Remove int pretending to be a size_t.ray2007-02-141-5/+2
| | | | OK millert@.
* change semantics of ff01::/16 to interface local multicastitojun2006-11-171-2/+3
| | | | | | (to sync up with more recent IPv6 spec) ok from: deraadt mcbride
* Clarify strlcpy code by explicitly naming variable `len' andray2006-04-181-5/+6
| | | | | | | separating out each step. Inspired during miscommunication with tedu@. OK deraadt@
* Remove str2number(), use strtonum(3) instead.ray2006-04-141-44/+20
| | | | | | | | Fix some type mismatches. Replace magic numbers. Remove superfluous strlen(3) calls. Earlier diff OK kjell@, OK deraadt@
* Pass size of correct variable to memset().ray2006-03-221-2/+2
| | | | | | From Alexey Dobriyan. OK otto@
* fix spelling mistake (in comment);jmc2005-07-181-2/+2
| | | | from ray lai;
* make the resolver stat resolv.conf and update if it changes.tedu2005-03-301-5/+5
| | | | useful feedback and ok deraadt@
* ansify. ok deraadt@ moritz@otto2005-03-251-80/+31
|
* major bump to libc and libpthread to break the dependency of amarc2004-06-071-2/+2
| | | | | | particular implementation of libpthread for libc. libc no longer needs pthread.h to compile. OK millert@, brad@, tedu@
* implement RFC3493 AI_NUMERICSERV. tedu okitojun2004-04-141-46/+14
|
* bug library/3297: lib/libc/net/get{addr,name}info should share mutexmarc2003-07-211-2/+3
| | | | 'Looks right' deraadt@
* fill ai_canonname field for numeric hostname, by the given hostname.itojun2003-05-141-8/+26
| | | | folows new recommendation in RFC3493. markus ok
* If hostname != NULL, hostname is not a numeric string, and AI_NUMERICHOSTjason2003-03-171-3/+3
| | | | is set, return EAI_NONAME like RFC2553 specifies. millert/itojun ok.
* strlcpy, check retval from sprintfitojun2003-03-041-2/+2
|
* thread safer libc (note: safer, not safe)marc2003-01-281-29/+47
| | | | | | | | | | Access to the global _res structure replaced by pointers to a per thread instance. If unthreaded the pointer is to the global structure. Also replaced a 64k stack array with malloc-ed memory so threaded aps (with a default 64k stack) have a chance at working. ok deraadt@
* allocate 64K recieve buffer for DNS responses.itojun2002-08-271-18/+33
|
* drop AAAA reply with IPv4 mapped address. sync w/kameitojun2002-08-221-1/+9
| | | | draft-itojun-v6ops-v4mapped-harmful-00.txt
* kill more strcpyderaadt2002-07-251-5/+4
|
* have _THREAD_PRIVATE_MUTEX for DNS/YP/hosts lookup.itojun2002-07-241-3/+16
|
* more type pedantitojun2002-07-011-2/+2
|
* lint clean (and don't mixup signed/unsigned). from martin husemannitojun2002-07-011-12/+12
|
* make more pedantic check on strtoul. from deraadt, sync w/kameitojun2002-07-011-8/+12
|
* correct port range check. from deraadt. sync w/kame. bind-bugs have ↵itojun2002-06-291-2/+3
| | | | already notified.
* %d/%u mixup (in #ifdef DEBUG)itojun2002-06-271-2/+2
|
* correct bad practice in the code - it uses two changing variablesitojun2002-06-261-10/+7
| | | | | | | to manage buffer (buf and buflen). we eliminate buflen and use fixed point (ep) as the ending pointer. this fix is NOT critical.
* Manual cleanup of remaining userland __P use (excluding packages maintained ↵millert2002-02-171-23/+21
| | | | outside the tree)
* Part one of userland __P removal. Done with a simple regexp with some minor ↵millert2002-02-161-16/+16
| | | | hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
* label abort() from inside library as ILLEGALderaadt2002-01-021-3/+3
|
* use snprintf, not sprintf. sync with kameitojun2001-08-201-2/+2
|
* use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel2001-06-271-3/+2
|
* support EDNS0 (RFC2671) buffer size notification on DNS queries.itojun2001-06-111-1/+4
| | | | | | | | | "options edns0" in /etc/resolv.conf will enable the behavior. no behavior change if you don't have the line. see resolv.conf(5) for more details. EDNS0 is useful for avoiding TCP DNS queries/replies on larger DNS responses. also, draft-ietf-dnsext-message-size-* plans to mandate EDNS0 support for DNS clients that support IPv6 transport.
* on /etc/hosts lookup, set "official host name" (the leftmost hostname)itojun2000-08-311-4/+7
| | | | | into ai_canonname. this is to synchronize with practice in gethostby*. comment from ume@mahoroba.org. sync with kame.
* Wallderaadt2000-08-221-2/+3
|
* reject empty scopeid/numeric portname. sync with kame.itojun2000-07-091-9/+16
|
* return EAI_NODATA, instead of EAI_NONAME, on name resolution errors.itojun2000-07-051-18/+18
| | | | | EAI_NONAME does not make sense in these situations. from kame. From: enami@netbsd.org