| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
'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
|
|
|
|
|
| |
Apply the same qsort() usage fix as in r304911 getaddrinfo.c
qsort() can't be stabilized with just return(-1) alone.
|
|
|
|
|
|
|
| |
initialized.
Reported by: Coverity
CID: 1018727
|
|
|
|
| |
Mostly on comments.
|
|
|
|
|
| |
rounddown2 tends to produce longer lines than the original code but
still it makes the code more readable.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
Sponsored by: Nginx, Inc.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
California's license, per the letter dated July 22, 1999.
|
|
|
|
|
| |
Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
getipnodebyname(1). RFC 2553 mentions IPv6 addresses
are returned 1st.
Spotted by: uqs
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
by the current code, and the results would get overwritten anyway
by subsequent memset().
Reviewed by: ume
MFC after: 1 month
|
|
|
|
|
|
| |
gethostbyname() and gethostbyaddr() accordingly
Approved by: re (kensmith), brooks (mentor)
|
|
|
|
| |
Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
- make it compilable
It still requires root privilege and is experimental.
Obtained from: KAME
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
databases.
- Make nsswitch support caching.
Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Sponsored by: Google Summer of Code 2005
|
|
|
|
| |
- Remove trailing space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Submitted by: stefanf
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
it is needed to make get{host,net}by*() thread-safe.
|
|
|
|
|
|
| |
- remove unused variable.
Obtained from: KAME
|
|
|
|
| |
Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
|
|
|
|
|
|
| |
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
|
| |
|
|
|
|
|
| |
to improve getaddrinfo(3). but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
|
| |
|
|
|
|
| |
Obtained from: KAME
|
|
|
|
| |
by getipnodebyname().
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
though getipnodebyname(3) is obsoleted api, some major applications
such as Mozilla are still using it. so, it will help ipv4 users.
|
| |
|
|
|
|
|
|
| |
namespace.h.
Sponsored by: DARPA, Network Associates Laboratories
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Obtained from: KAME
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Fail when it is detected.
|
|
|
|
|
|
| |
broke pthreads.
Reported by: mbr, tjr
|