Up to [DragonFly] / src / lib / libc / net
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Cleanup: - Add $DragonFly$. - Ansify function definitions. - In function definitions, move the type on a line of its own. - Move function's open brace on a line of its own. - Remove (void) casts for discarded return values. - Remove unused variables.
Get rid of the third clause where we can.
Remove register keyword usage. Add missing $DragonFly$ keyword to the following files: src/lib/libc/db/btree/bt_utils.c src/lib/libc/db/hash/hash_log2.c src/lib/libc/net/getproto.c src/lib/libc/net/getprotoent.c src/lib/libc/net/getprotoname.c src/lib/libc/net/getservbyname.c src/lib/libc/net/getservbyport.c src/lib/libc/net/iso_addr.c src/lib/libc/net/linkaddr.c src/lib/libc/net/ns_ntoa.c src/lib/libc/quad/muldi3.c src/lib/libc/quad/qdivrem.c src/lib/libc/rpc/authdes_prot.c src/lib/libc/rpc/key_prot_xdr.c src/lib/libcompat/4.3/insque.c src/lib/libcompat/4.3/lsearch.c src/lib/libcompat/4.3/remque.c src/lib/libcompat/4.4/cuserid.c src/lib/libcompat/regexp/regexp.c src/lib/libcompat/regexp/regsub.c src/lib/libcr/db/btree/bt_utils.c src/lib/libcr/db/hash/hash_log2.c src/lib/libcr/net/getproto.c src/lib/libcr/net/getprotoent.c src/lib/libcr/net/getprotoname.c src/lib/libcr/net/getservbyname.c src/lib/libcr/net/getservbyport.c src/lib/libcr/net/iso_addr.c src/lib/libcr/net/linkaddr.c src/lib/libcr/net/ns_ntoa.c src/lib/libcr/quad/muldi3.c src/lib/libcr/quad/qdivrem.c src/lib/libcr/rpc/authdes_prot.c src/lib/libcr/rpc/key_prot_xdr.c src/lib/libedit/common.c src/lib/libedit/emacs.c src/lib/libipx/ipx_ntoa.c src/lib/libm/common_source/fmod.c src/lib/libstand/ether.c src/lib/libstand/fstat.c src/lib/libstand/gets.c src/lib/libstand/ioctl.c src/lib/libstand/netif.c src/lib/libstand/rarp.c src/lib/libstand/rpc.c src/lib/libstand/strcasecmp.c src/lib/libstand/strtol.c src/lib/libstand/write.c
res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND* hp->rcode == SERVFAIL. However, there are cases such as timeouts where rcode is not always set to SERVFAIL. This leads to inconsistent nameserver operation during multi-domain and truncated dot searches, especially during booting when portions of the network are being brought up simultanious with dns lookups. This patch attempts to correct the problem by unconditionally terminating the search if TRY_AGAIN is returned (after res_query has gone through all retries and name servers) instead of trying other domain elements in the domain seach path. This patch should fix reported problems (which I can reproduce) with some NFS mounts failing during boot. This occured because mount_nfs thought the host name lookup returned a definitive failure using a non-dotted host name when, in fact, it timed out on the first part (host.search.domain.name) and got a definitive host-not-found response on the second part (host.). Generally speaking, search path name server timeouts can exceed 60 seconds per element and most machines which consistently timeout on earlier portions of a search path are effectively non-operational due to the imposed delays. It is more important for DNS lookups to return the proper error code then to be able to recover a valid lookup in later portions of the search path in these situations.
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 22.214.171.124