#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
305402 |
|
04-Sep-2016 |
ache |
MFC r305144
'addrlen' does not matter when we need to find the first non-zero bit in the byte from the left and 'addrlen' already counted in 'lim'.
PR: 212121 Submitted by: Herbie.Robinson@stratus.com
|
#
305317 |
|
02-Sep-2016 |
ache |
MFC r305133
Apply the same qsort() usage fix as in r304911 getaddrinfo.c qsort() can't be stabilized with just return(-1) alone.
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
299922 |
|
16-May-2016 |
truckman |
Don't call free_addrselectpolicy(&policyhead) before policyhead has been initialized.
Reported by: Coverity CID: 1018727
|
#
298830 |
|
29-Apr-2016 |
pfg |
libc: spelling fixes.
Mostly on comments.
|
#
298323 |
|
19-Apr-2016 |
pfg |
libc: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code but still it makes the code more readable.
|
#
298120 |
|
16-Apr-2016 |
pfg |
libc: make some more use of the nitems() macro.
We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
|
#
292554 |
|
21-Dec-2015 |
ume |
Use _map_v4v6_address().
MFC after: 1 week
|
#
281143 |
|
06-Apr-2015 |
glebius |
Stop including if_var.h from userland.
Sponsored by: Nginx, Inc.
|
#
255328 |
|
06-Sep-2013 |
jilles |
libc: Use SOCK_CLOEXEC for various internal file descriptors.
This change avoids undesirably passing some internal file descriptors to a process created (fork+exec) by another thread.
Kernel support for SOCK_CLOEXEC was added in r248534, March 19, 2013.
|
#
251071 |
|
28-May-2013 |
emaste |
Remove the advertising clause from the Regents of the University of California's license, per the letter dated July 22, 1999.
|
#
245256 |
|
10-Jan-2013 |
ume |
Re-enable ip6addrctl support but only for IPv6 address.
Requested by: Ben Morrow <ben__at__morrow.me.uk> MFC after: 1 week
|
#
245225 |
|
09-Jan-2013 |
ume |
Disable destination address selection support of getipnodebyname(1). RFC 2553 mentions IPv6 addresses are returned 1st.
Spotted by: uqs MFC after: 1 week
|
#
233770 |
|
02-Apr-2012 |
delphij |
Eliminate two cases of unwanted strncpy(). The name is not required by the current code, and the results would get overwritten anyway by subsequent memset().
Reviewed by: ume MFC after: 1 month
|
#
171671 |
|
31-Jul-2007 |
bushman |
- Getipnodebyname() and getipnodebyaddr() reimplemented through gethostbyname() and gethostbyaddr() accordingly
Approved by: re (kensmith), brooks (mentor)
|
#
160699 |
|
26-Jul-2006 |
yar |
Fix build w/o INET6.
Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
|
#
160586 |
|
23-Jul-2006 |
ume |
stop use of mutex lock in ICMP lookup.
MFC after: 1 week
|
#
160550 |
|
21-Jul-2006 |
ume |
- draft-ietf-ipngwg-icmp-namelookups-09 - make it compilable
It still requires root privilege and is experimental.
Obtained from: KAME MFC after: 1 week
|
#
158115 |
|
28-Apr-2006 |
ume |
- Extend the nsswitch to support Services, Protocols and Rpc databases. - Make nsswitch support caching.
Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
|
#
157119 |
|
25-Mar-2006 |
ume |
- Use ANSI C prototype. - Remove trailing space.
|
#
156960 |
|
21-Mar-2006 |
ume |
Update the resolver in libc to BIND9's one.
Since, res_sendsigned(3) and the friends use MD5 functions, it is hard to include them without having MD5 functions in libc. So, res_sendsigned(3) is not merged into libc.
Since, res_update(3) in BIND9 is not binary compatible with our res_update(3), res_update(3) is leaved as is, except some necessary modifications. The res_update(3) and the friends are not essential part of the resolver. They are not defined in resolv.h but defined in res_update.h separately in BIND9. Further, they are not called from our tree. So, I hide them from our resolv.h, but leave them only for binary backward compatibility (perhaps, no one calls them).
Since, struct __res_state_ext is not exposed in BIND9, I hide it from our resolv.h. And, global variable _res_ext is removed. It breaks binary backward compatibility. But, since it is not used from outside of our libc, I think it is safe.
Reviewed by: arch@ (no objection)
|
#
152445 |
|
15-Nov-2005 |
ume |
The KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASES define also, but res_config.h was not included into libc/net/name6.c. So getipnodebyaddr() ignored the multiple PTRs.
PR: kern/88241 Submitted by: Dan Lukes <dan__at__obluda.cz> MFC after: 3 days
|
#
146700 |
|
27-May-2005 |
ume |
reduce cast.
MFC after: 1 week
|
#
146222 |
|
14-May-2005 |
gnn |
Submitted by: Jinmei Tatuya, Hajimu Umemoto Reviewed by: rwatson at freebsd dot org Approved by: rwatson at freebsd dot org MFC after: 1 week
Fix the matchlen() function so that it handles the IPv4 (AF_INET) case correctly. Until now it has been treating IPv4 addresses as if they were IPv6 which could lead to corruption errors.
|
#
146192 |
|
13-May-2005 |
ume |
raise readability bit.
|
#
145786 |
|
02-May-2005 |
ume |
the 3rd argument of getsockname() should be socklen_t*.
Submitted by: stefanf
|
#
145770 |
|
01-May-2005 |
ume |
oops, we don't need previous change.
|
#
145768 |
|
01-May-2005 |
ume |
make it compilable without YP definition.
|
#
145634 |
|
28-Apr-2005 |
ume |
we don't need mutex lock to call _gethostbynis*(), anymore.
|
#
145632 |
|
28-Apr-2005 |
ume |
_gethostbynis{addr,name}() can handle an IPv6, now.
|
#
145602 |
|
27-Apr-2005 |
ume |
hide implementation specific internal functions from netdb.h. it is needed to make get{host,net}by*() thread-safe.
|
#
145271 |
|
19-Apr-2005 |
ume |
- nuke deprecated and unused getnodeby(3). - remove unused variable.
Obtained from: KAME
|
#
144839 |
|
09-Apr-2005 |
ume |
unbreak build without YP defined.
Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
|
#
144715 |
|
06-Apr-2005 |
ume |
- we are no longer shareing any resources to be locked between getaddrinfo(3) and getipnodeby*(3). - use definitions in reentrant.h. - remove obsolete comment.
|
#
144673 |
|
05-Apr-2005 |
ume |
add missing mutex unlock.
|
#
144527 |
|
02-Apr-2005 |
ume |
nuke the logic for AF_UNSPEC and simplify. once, it was introduced to improve getaddrinfo(3). but, it is not needed for a long time since getaddrinfo(3) became providing its own res_*N() functions.
|
#
140910 |
|
27-Jan-2005 |
ume |
make _getipnodebyname_multi() static.
|
#
132508 |
|
21-Jul-2004 |
ume |
now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int
Obtained from: KAME
|
#
129984 |
|
02-Jun-2004 |
ume |
use source address as a hint to determine destination address by getipnodebyname().
|
#
127933 |
|
06-Apr-2004 |
pb |
Add a missing "*errp = h_errno" forgotten in rev 1.36.
|
#
127909 |
|
05-Apr-2004 |
pb |
Fix _dns_ghbyname() to return NS_TRYAGAIN instead of NS_NOTFOUND on temporary nameserver failure. This is necessary to get getipnodebyname(3) to correctly return h_errno=TRY_AGAIN instead of HOST_NOT_FOUND.
Reviewed by: green, thomas MFC after: 1 week
|
#
126243 |
|
25-Feb-2004 |
green |
Make the resolver(3) and many associated interfaces much more reentrant. The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now with what should be totally reentrant, and h_errno values will now be preserved correctly, but this does not affect interfaces such as gethostbyname(3) which are still mostly non-reentrant.
In all of these relevant functions, the thread-safety has been pushed down as far as it seems possible right now. This means that operations that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected still under global locks that getaddrinfo(3) defines, but where possible the locking is greatly reduced. The most noticeable improvement is that multiple DNS lookups can now be run at the same time, and this shows major improvement in performance of DNS-lookup threaded programs, and solves the "Mozilla tab serialization" problem.
No single-threaded applications need to be recompiled. Multi-threaded applications that reference "_res" to change resolver(3) options will need to be recompiled, and ones which reference "h_errno" will also if they desire the correct h_errno values. If the applications already understood that _res and h_errno were not thread-safe and had their own locking, they will see no performance improvement but will not actually break in any way.
Please note that when NSS modules are used, or when nsdispatch(3) defaults to adding any lookups of its own to the individual libc _nsdispatch() calls, those MUST be reentrant as well.
|
#
126052 |
|
20-Feb-2004 |
ume |
add destination address selection support for getipnodebyname(3). though getipnodebyname(3) is obsoleted api, some major applications such as Mozilla are still using it. so, it will help ipv4 users.
|
#
114681 |
|
04-May-2003 |
deischen |
Replace use of a spinlock with a mutex.
|
#
113976 |
|
24-Apr-2003 |
nectar |
Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by namespace.h.
Sponsored by: DARPA, Network Associates Laboratories
|
#
111010 |
|
16-Feb-2003 |
nectar |
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go). Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled.
Reviewed by: /sbin/md5
|
#
105783 |
|
23-Oct-2002 |
ume |
query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
Obtained from: KAME MFC after: 1 week
|
#
104558 |
|
06-Oct-2002 |
ume |
Put giant locks due to make getaddrinfo(), getnameinfo() and getipnodeby*() thread-safe. Our res_*() is not thread-safe. So, we share lock between getaddrinfo() and getipnodeby*(). Still, we cannot use getaddrinfo() and getipnodeby*() in conjunction with other functions which call res_*().
Requested by: many people
|
#
103401 |
|
16-Sep-2002 |
ume |
Allocate 64K recieve buffer for DNS responses.
|
#
103350 |
|
15-Sep-2002 |
nectar |
Check for truncation in calls to res_send/res_query/res_search. Fail when it is detected.
|
#
103335 |
|
15-Sep-2002 |
nectar |
Backout the increase of MAXPACKET from 1024 to 65536: it broke pthreads.
Reported by: mbr, tjr
|
#
103307 |
|
13-Sep-2002 |
nectar |
When using res_send/res_query/res_search, the caller must either insure enough space is available for the response, or be prepared to resize the buffer and retry as necessary.
Do the conservative thing and make sure enough space is available.
Reviewed by: silence on freebsd-audit
|
#
98887 |
|
26-Jun-2002 |
imp |
Remove two lines that were cvs merged that shouldn't have been. This fixes the build.
Reported by: dillon.
|
#
98865 |
|
26-Jun-2002 |
imp |
Include more robust checking of end of buffer that more completely plugs the hole.
|
#
98855 |
|
26-Jun-2002 |
imp |
Avoid remote buffer overflow on hostbuf[].
Submitted by: joost Pol <joost@pine.nl>
|
#
92986 |
|
22-Mar-2002 |
obrien |
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
|
#
92941 |
|
22-Mar-2002 |
obrien |
Remove multi-line __P() usage.
|
#
92905 |
|
21-Mar-2002 |
obrien |
Remove __P() usage.
|
#
92889 |
|
21-Mar-2002 |
obrien |
Remove 'register' keyword.
|
#
71579 |
|
24-Jan-2001 |
deischen |
Remove _THREAD_SAFE and make libc thread-safe by default by adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in.
Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo
Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo.
Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible.
Remove uneeded includes of <errno.h> from a few files.
Add $FreeBSD$ to a few files in order to pass commitprep.
Approved by: -arch
|
#
65558 |
|
07-Sep-2000 |
nectar |
Fix getipnodebyname(3) bug.
Submitted by: ume
|
#
65532 |
|
06-Sep-2000 |
nectar |
Add nsswitch support. By creating an /etc/nsswitch.conf file, you can configure FreeBSD so that various databases such as passwd and group can be looked up using flat files, NIS, or Hesiod.
= Hesiod has been added to libc (see hesiod(3)).
= A library routine for parsing nsswitch.conf and invoking callback functions as specified has been added to libc (see nsdispatch(3)).
= The following C library functions have been modified to use nsdispatch: . getgrent, getgrnam, getgrgid . getpwent, getpwnam, getpwuid . getusershell . getaddrinfo . gethostbyname, gethostbyname2, gethostbyaddr . getnetbyname, getnetbyaddr . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr
= host.conf has been removed from src/etc. rc.network has been modified to warn that host.conf is no longer used at boot time. In addition, if there is a host.conf but no nsswitch.conf, the latter is created at boot time from the former.
Obtained from: NetBSD
|
#
63490 |
|
19-Jul-2000 |
ume |
To define A RR to root (.) is valid in DNS. So, h_name = "" shouldn't be treated as NULL.
PR: bin/19816 Submitted by: Bill Fenner <fenner@research.att.com> Reviewed by: Atsushi Onoe <onoe@sm.sony.co.jp>
|
#
62428 |
|
03-Jul-2000 |
kris |
Previous commit broke the case of chained CNAME entries. Instead handle the bogus case by being stricter about errors.
Submitted by: itojun Obtained from: KAME
|
#
62427 |
|
03-Jul-2000 |
kris |
Fix a nasty bug which would leave the struct hostent incompletely filled out when parsing certain DNS records during a reverse address resolution. Thus when code tries to examine the returned host name, it dereferences a null pointer :-(
Problem noticed by: ps
|
#
60938 |
|
26-May-2000 |
jake |
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen.
Requested by: msmith and others
|
#
60833 |
|
23-May-2000 |
jake |
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk Reviewed by: phk Approved by: mdodd
|
#
60296 |
|
09-May-2000 |
itojun |
correct possible security issue(s) in name resolution, due to use of pre-4.9.7 BIND resolver code. ftp://ftp.kame.net/pub/mail-list/snap-users/2348 for details.
Reviewed by: ume
|
#
59411 |
|
20-Apr-2000 |
shin |
Change getaddrinfo() resolve order from all AAAA trial, then all A trial to try AAAA and A for each trial
TODO: more fix for the case where IPv4 mapped IPv6 addr is disabled
Reviewed by: ume
|
#
58096 |
|
15-Mar-2000 |
jlemon |
Fix uninitialized variable.
Submitted by: tanimura
|
#
57878 |
|
09-Mar-2000 |
jlemon |
Add in IPV4 NIS support.
PR: 17290 (but not the same patch) Approved by: jkh
|
#
57107 |
|
10-Feb-2000 |
shin |
Let getaddrinfo() and related functions supports traditional IPv4 format (shortend format, etc)
Current KAME getaddrinfo() supports only d.d.d.d format IPv4 addr. But traditionally inet_aton() and etc support other formats. (shortend format and octal/deciaml/hex format) Aboud this, -As far as the discussion on freebsd-current, many people think traditional format should also be supported by getaddrinfo(). -X/Open spec requires getaddrinfo() also support those traditional IPv4 format. -RFC2553 say nothing about it. -As the result of confirmation in ietf/ipng list, there is no clear concensus yet, and the reply was, "RFC2553 update and X/Open spec will be in sync"
So takeing these conditions into account, I think getaddrinfo() should also support traditional IPv4 format.
Specified by: Marc Schneiders <marc@oldserver.demon.nl> Approved by: jkh
|
#
56698 |
|
27-Jan-2000 |
jasone |
Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(), just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo().
Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().
Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid().
Make thread cancellation fully POSIX-compliant.
Suggested by: deischen
|
#
55877 |
|
13-Jan-2000 |
shin |
added IPv6 unspecified addr check for getipnodebyaddr.
|
#
55837 |
|
12-Jan-2000 |
jasone |
Add three-tier symbol naming in support of POSIX thread cancellation points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
|
#
55163 |
|
28-Dec-1999 |
shin |
Getaddrinfo(), getnameinfo(), and etc support in libc/net. Several udp and raw apps IPv6 support.
Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
|