History log of /freebsd-10.0-release/lib/libc/net/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255695 19-Sep-2013 tuexen

Remove an unused variable and fix a memory leak in sctp_connectx().

Approved by: re (gjb)
MFC after: 3 days


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.


254700 23-Aug-2013 jilles

libc: Make various internal file descriptors from fopen() close-on-exec.


254484 18-Aug-2013 pjd

Consistently use 'af' as an argument name for address family.
Now both gethostbyname2(3) and gethostbyaddr(3) use the same argument name.
The same argument name is also used in implementations of those functions.


253105 09-Jul-2013 tuexen

Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().

MFC after: 3 days


253104 09-Jul-2013 tuexen

Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
sctp_opt_info().

MFC after: 3 days


253066 09-Jul-2013 hrs

Update references.


251575 09-Jun-2013 jilles

Make recv() and send() cancellation points, as required by POSIX.

Call the recvfrom() and sendto() functions overridden by libthr instead of
the _recvfrom() and _sendto() versions that are not cancellation points.


251475 06-Jun-2013 emaste

Switch to 2-clause license and standard text

Approved by: bms@


251369 04-Jun-2013 joel

mdoc: convert .Fd to .In, which is much nicer.


251295 03-Jun-2013 emaste

Switch to 2-clause license

Approved by: bms@


251091 29-May-2013 emaste

Remove clause 3 and 4 from TNF licenses

Per the NetBSD Foundation statement
Third parties are encouraged to change the license on any files which
have a 4-clause license contributed to the NetBSD Foundation to a
2-clause license.


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.


251067 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.


250888 21-May-2013 ed

Update manpages for r250887.

Remove the lists of unneeded header files.

Requested by: eadler


250227 04-May-2013 jkim

Improve compatibility with recent flex from flex.sourceforge.net.


249333 10-Apr-2013 tuexen

Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

MFC after: 1 week


248252 13-Mar-2013 jilles

libc: Avoid SIGPIPE when nscd closes the connection unexpectedly.

It is almost always a bug if nscd closes the connection unexpectedly but
programs should not be killed with SIGPIPE for it.

Reviewed by: bushman
Tested by: Jan Beich
MFC after: 1 week


246809 14-Feb-2013 zeising

Change examples to be consistent with what style(9) says.

Approved by: joel (mentor)
MFC After: 2 weeks


246629 10-Feb-2013 tuexen

Improve code style. No functional change.

MFC after: 3 days


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


243302 19-Nov-2012 tuexen

Cleanup the code a bit, which improves the portability.
MFC after: 1 week


243300 19-Nov-2012 tuexen

Fix the handling of mapped IPv6 addresses in sctp_connectx().

MFC after: 3 days


243156 16-Nov-2012 kevlo

- the preferred way to write a NULL pointer constant is with NULL
- whitespace nit

Reviewed by: glebius


242512 03-Nov-2012 tuexen

Fix errno in a couple of error cases.

MFC after: 3 days


241844 22-Oct-2012 eadler

remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week


238599 18-Jul-2012 emax

Return zero from get_addrselectpolicy() when no source-address-selection
policy is installed.

MFC after: 1 week


238504 15-Jul-2012 jilles

libc: Remove some unused strings from getaddrinfo().


237402 21-Jun-2012 obrien

Be explicit about the dependency on nsparser.h.


236695 06-Jun-2012 dim

Fix two warnings about self-assignment in libc. These normally only
trigger with clang, when you either use -save-temps, or ccache.

Reported by: Sevan / Venture37 <venture37@gmail.com>
MFC after: 3 days


235827 23-May-2012 tuexen

Update copyright date.

MFC after: 3 days


235767 22-May-2012 kevlo

Add missing header needed by free()

Reported by: tinderbox


235640 19-May-2012 marcel

Use the LLINDEX macro to access the link-level I/F index. This makes
it possible to work with a different type for the sdl_index field --
it only requires a recompile.

Obtained from: Juniper Networks, Inc.


235401 13-May-2012 joel

mdoc: avoid unterminated quoted strings.


235286 11-May-2012 gjb

General mdoc(7) and typo fixes.

PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days


234997 04-May-2012 tuexen

Remove debug output.

MFC after: 3 days


234716 26-Apr-2012 tuexen

Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by
Konstantin Belousov.

MFC after: 1 week.
X-MFC with: r234715


234715 26-Apr-2012 tuexen

Export symbols for sctp_sendv() and sctp_recvv().

MFC after: 1 week


234329 16-Apr-2012 eadler

When searching for uninitialized memory usage add ensure that the entire
struct is set to zero.

PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days


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


233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


233576 27-Mar-2012 joel

Minor indentation and paragraph nits.


233522 26-Mar-2012 joel

mdoc: correct .Bd/.Bl arguments.

Reviewed by: brueffer


233462 25-Mar-2012 joel

Remove superfluous paragraph macro.


233138 19-Mar-2012 eadler

draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR: docs/163771
Submitted by: phk
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva
MFC after: 1 week


231564 12-Feb-2012 ed

Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after: 1 month


231506 11-Feb-2012 bz

Switch getifaddrs(3) to the new API introduced in r231505. Also remove
conditional code parts not used by or applicable to FreeBSD.

The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.

This restores carp(4) config support in HEAD after r231504.

Reviewed by: glebius, brooks
MFC After: 3 months


231504 11-Feb-2012 bz

Backout changes from r228571. Remove if_data from struct ifa_msghdr again.
While this breaks carp on HEAD temporary, it restores the upgrade path from
stable, and head before 20111215.

Reviewed by: glebius, brooks


231196 08-Feb-2012 brooks

eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and
ether_nota_r and do not use static variables so remove the note copied
from ethers.3 saying they do.

Reported by: bms
MFC after: 3 days


229766 07-Jan-2012 ume

Handle the internal scope address representation of the KAME IPv6
stack for the node-local multicast address.

Spotted by: Rainer Bredehorn <Bredehorn__at__gmx.de>
MFC after: 1 week


229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


228843 23-Dec-2011 cperciva

Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam


228630 17-Dec-2011 tuexen

Address warnings found by clang.

MFC after: 3 months.


228571 16-Dec-2011 glebius

A major overhaul of the CARP implementation. The ip_carp.c was started
from scratch, copying needed functionality from the old implemenation
on demand, with a thorough review of all code. The main change is that
interface layer has been removed from the CARP. Now redundant addresses
are configured exactly on the interfaces, they run on.

The CARP configuration itself is, as before, configured and read via
SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or
SIOCAIFADDR_IN6 may now be configured to a particular virtual host id,
which makes the prefix redundant.

ifconfig(8) semantics has been changed too: now one doesn't need
to clone carpXX interface, he/she should directly configure a vhid
on a Ethernet interface.

To supply vhid data from the kernel to an application the getifaddrs(8)
function had been changed to pass ifam_data with each address. [1]

The new implementation definitely closes all PRs related to carp(4)
being an interface, and may close several others. It also allows
to run a single redundant IP per interface.

Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for
idea on using ifam_data and for several rounds of reviewing!

PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448
Reviewed by: bz
Submitted by: bz [1]


228531 15-Dec-2011 tuexen

Fix a bug where sctp_sendmdg() uses uninitialized memory.

MFC after: 3 days.


227755 20-Nov-2011 tuexen

Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

MFC after: 3 months.


226111 07-Oct-2011 ed

Fix whitespace inconsistencies found in homegrown Symbol.maps.


224701 08-Aug-2011 hrs

Fix a pathname (s,netinet/if_ether.h,net/ethernet.h,).

PR: docs/159341
Submitted by: Garrett Cooper
Approved by: re (kib)


224641 03-Aug-2011 tuexen

The result of a joint work between rrs@ and myself at the IETF:
* Decouple the path supervision using a separate HB timer per path.
* Add support for potentially failed state.
* Bring back RTO.min to 1 second.
* Accept packets on IP-addresses already announced via an ASCONF
* While there: do some cleanups.

Approved by: re@
MFC after: 2 months.


223225 18-Jun-2011 tuexen

Document the latest changes to sctp_opt_info() in the code.
This makes sctp_opt_info() compiliant with the latest version
of the socket API ID.


223180 17-Jun-2011 tuexen

Add SCTP_MAX_BURST support to sctp_opt_info().
This only applies to 9.0 and higher, since the type
of the values has changed since we introduced it.
So it can't be MFCed.


223178 17-Jun-2011 tuexen

Update the list of supported socket options for sctp_opt_info().

MFC after: 1 month.


223154 16-Jun-2011 tuexen

Fix two typos and remove redundant code.

MFC after: 1 month.


223152 16-Jun-2011 tuexen

* Fix the handling of addresses in sctp_sendv().
* Add support for SCTP_SENDV_NOINFO.
* Improve the error handling of sctp_sendv() and sctp_recv().

MFC after: 1 month


223132 15-Jun-2011 tuexen

Add support for the newly added SCTP API.
In particular add support for:
* SCTP_SNDINFO, SCTP_PRINFO, SCTP_AUTHINFO, SCTP_DSTADDRV4, and
SCTP_DSTADDRV6 cmsgs.
* SCTP_NXTINFO and SCTP_RCVINFO cmgs.
* SCTP_EVENT, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO and SCTP_DEFAULT_SNDINFO
socket option.
* Special association ids (SCTP_FUTURE_ASSOC, ...)
* sctp_recvv() and sctp_sendv() functions.

MFC after: 1 month.


221512 05-May-2011 tuexen

* Update copyright notice.
* Cleanup usage of iov's.
* Add support for SCTP_TIMEOUTS socketoption.
* Fix a bug in sctp_recvmsg(): return the msg_flags in case of an error.
* Fix a bug in the error handling of sctp_peeloff(): return the -1.


217143 08-Jan-2011 kib

Fix struct FILE * leak on error (in disabled by default hesiod support code).

Submitted by: henning petersen <henning.petersen t-online de>
PR: 153756
MFC after: 1 week


213785 13-Oct-2010 rpaulo

Clang related fixes:
* When calling syslog(), pass a format string.
* Define YY_NO_INPUT on nslexer.l

Submitted by: Norberto Lopes <nlopes.ml at gmail.com>


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


213453 05-Oct-2010 ume

When no protocol entry is found, getproto*_r(3) should
return zero.

Spotted by: Kostik Belousov <kostikbel__at__gmail.com>
MFC after: 2 weeks


213403 04-Oct-2010 ume

Clear errno for each method dispatch.

Spotted by: Kostik Belousov <kostikbel__at__gmail.com>
MFC after: 2 weeks


212463 11-Sep-2010 brucec

Revert changes of 'assure' to 'ensure' made in r211936.

Approved by: rrs (mentor)


211936 28-Aug-2010 brucec

Fix incorrect usage of 'assure' and 'insure'.

Approved by: rrs (mentor)


211397 16-Aug-2010 joel

Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>


211340 15-Aug-2010 ume

Correct the return code from _dns_gethostby*() to correspond
with h_errno.

Obtained from: NetBSD
MFC after: 2 weeks


211276 13-Aug-2010 ume

- When there is no room for returning the result, nss backend
have to return ERANGE and terminate with NS_RETURN.
- When gethostbyname_r(3) and the friends end with an error,
set errno to the value nss backend returns, and return errno
value.

PR: kern/131623
MFC after: 2 weeks


210933 06-Aug-2010 joel

Fix typos and spelling mistakes.


210772 02-Aug-2010 joel

Spelling fixes.


209760 07-Jul-2010 rrs

If a user calls sctp_sendx() with a NULL
sinfo we will crash. Instead we should provide
our own temp structure to use internally.

MFC after: 1 month


209709 05-Jul-2010 brucec

Increment 'sa' at the end of the loop; otherwise, only the first
address ever gets checked.

Approved by: rrs (mentor)
MFC after: 1 month


209684 04-Jul-2010 brucec

Use ISO C99 integer types instead of the BSD-specific u_int*_t.

Approved by: rrs (mentor)


209058 11-Jun-2010 brucec

sctp_recvmsg returns the number of bytes received, not sent.

Approved by: rrs (mentor)
MFC after: 1 month


206267 06-Apr-2010 ume

Use the stored length value instead of calculating it by strlen().


206155 04-Apr-2010 ume

Add capability to use a db version of services. It is enabled by
specifying `db' as source of service in /etc/nsswitch.conf.

MFC after: 2 weeks


206154 04-Apr-2010 ume

Reduce duplicate code.

MFC after: 2 weeks


206153 04-Apr-2010 ume

Treat '+' as special only when in compat mode, and simplify
the logic bit.

MFC after: 2 weeks


206152 04-Apr-2010 ume

Stop adding trailing '\n'. The servent_unpack() doesn't expect
lines terminated with '\n'.

MFC after: 2 weeks


203323 31-Jan-2010 brucec

Remove extra semicolon.

Approved by: rrs (mentor)


203322 31-Jan-2010 brucec

Fix typo of ENOTCONN.
Add missing RETURN VALUES section in sctp_opt_info(3).

Approved by: rrs (mentor)


202176 12-Jan-2010 brueffer

Miscellaneous mdoc, spelling and inconsistency fixes.

PR: 142573, 142576 (mostly)
Submitted by: brucec
MFC after: 1 week


199873 28-Nov-2009 danger

- correct xref sections

PR: docs/140940
Submitted by: Bruce Cran <bruce@cran.org.uk>
MFC after: 1 week


199221 12-Nov-2009 ume

Add missing IEEE1394 support dropped during merge from NetBSD.


199188 11-Nov-2009 ume

ANSIfy.

MFC after: 1 week


199083 09-Nov-2009 ume

Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.


197029 09-Sep-2009 phk

Revert r196976, now that <machine/param.h> behaves predictably.


196976 08-Sep-2009 phk

Add necessary include


193024 29-May-2009 delphij

Document how to enable strict RFC 1034 enforcements.

PR: kern/129477


192911 27-May-2009 zml

Fix an issue when nss fallback routines are used in a multithreaded application.

Reviewed by: bushman
Approved by: dfr (mentor)


191654 29-Apr-2009 bms

Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
the kernel will return in msfr_nsrcs the number of source filters
in-mode for a given multicast group.
However, the filters themselves were never copied out, as the libc
function clobbers this field with zero, causing the kernel to assume
the provided vector of struct sockaddr_storage has zero length.
This bug would only affect users of SSM multicast, which is shimmed
in 7.x.
Picked up during mtest(8) refactoring.

MFC after: 1 day


190525 29-Mar-2009 ume

Query DNS only once per an address family.

Obtained from: KAME
MFC after: 2 weeks


190416 25-Mar-2009 ume

Add support for SCTP to getaddrinfo(3).
Now, getaddrinfo(3) returns two SOCK_STREAMs, IPPROTO_TCP and
IPPROTO_SCTP. It confuses some programs. If getaddrinfo(3) returns
IPPROTO_SCTP when SOCK_STREAM is specified by hints.ai_socktype, at
least Apache doesn't work. So, I made getaddrinfo(3) to return
IPPROTO_SCTP with SOCK_STREAM only when IPPROTO_SCTP is specified
explicitly by hints.ai_protocol.

PR: bin/128167
Submitted by: Bruce Cran <bruce__at__cran.org.uk> (partly)
MFC after: 2 week


190382 24-Mar-2009 ume

getaddrinfo(3) should accept numeric when ai_socktype is not
specified in hint or hints is NULL.

PR: bin/51827
Submitted by: Mark Andrews <marka__at__isc.org>
MFC after: 1 week


189336 04-Mar-2009 bms

Considerably improve the wording of this man page.


189335 04-Mar-2009 bms

Update copyright.


189208 01-Mar-2009 delphij

Add a missing .El.


188316 08-Feb-2009 ume

Shutup warning for DNAME RR.

PR: bin/127591
Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv>
MFC after: 1 week


186819 06-Jan-2009 danger

- forgot to bump a date


186817 06-Jan-2009 danger

catch up wtih r175955 by ume:

- the support of AI_ALL and AI_V4MAPPED has been completely removed.


186095 14-Dec-2008 murray

Add an ENVIRONMENT section to note that the RSH variable can be set to
override the use of the rsh(1) program in rcmd(3).

PR: docs/51133
Obtained from: NetBSD, partially
MFC after: 3 weeks


180162 01-Jul-2008 danger

- AI_ALL and AI_V4MAPPED flags are currently not supported

PR: docs/120248
Submitted by: Heiko Wundram <wundram (a) beenic.net>


178720 02-May-2008 jhb

Include libc_private.h for the declaration of __isthreaded instead of
relying on namespace pollution in stdio.h.

MFC after: 3 days


175955 03-Feb-2008 ume

Remove incomplete support of AI_ALL and AI_V4MAPPED.

Reported by: "Heiko Wundram (Beenic)" <wundram__at__beenic.net>


174716 17-Dec-2007 bushman

Moved logging out of the nss_method_lookup() in order not to
flood logs with failed fallback method lookup attempts.


174547 12-Dec-2007 bushman

Implementing 'fallback' nsswitch source. 'fallback' source is used
when particular function can't be found in nsswitch-module. For
example, getgrouplist(3) will use module-supplied 'getgroupmembership'
function (which can work in an optimal way for such source as LDAP) and
will fall back to the stanard iterate-through-all-groups implementation
otherwise.

PR: ports/114655
Submitted by: Michael Hanselmann <freebsd AT hansmi DOT ch>
Reviewed by: brooks (mentor)


173660 15-Nov-2007 ru

Fix bad rule and bad dependency for nsparser.h that can
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.

(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)

Reported by: kensmith


173185 30-Oct-2007 keramida

mdoc fix: remove extraneous empty line.

MFC after: 3 days


172730 17-Oct-2007 tmclaugh

- Correctly define CACHED_SOCKET_PATH as /var/run/nscd after cached to
nscd renaming.

Approved by: mux


172320 25-Sep-2007 brueffer

Assorted spelling, punctuation and mdoc fixes.

Approved by: re (blanket)


172253 20-Sep-2007 gabor

- Fix description to say "receive" instead of "send"

PR: docs/115466
Submitted by: Bruce Cran <bruce@cran.org.uk>
Approved by: re (bmah)


172052 05-Sep-2007 jinmei

ensure the head entry of addrinfo chain has non-NULL ai_canonname to be
compliant with RFC3493.

PR: standards/114910
Approved by: ume (mentor)
Approved by: re
MFC after: 1 week


171671 31-Jul-2007 bushman

- Getipnodebyname() and getipnodebyaddr() reimplemented through
gethostbyname() and gethostbyaddr() accordingly

Approved by: re (kensmith), brooks (mentor)


171572 24-Jul-2007 rrs

- take out a needless panic under invariants for sctp_output.c
- Fix addrs's error checking of sctp_sendx(3) when addrcnt is less than
SCTP_SMALL_IOVEC_SIZE
- re-add back inpcb_bind local address check bypass capability
- Fix it so sctp_opt_info is independant of assoc_id postion.
- Fix cookie life set to use MSEC_TO_TICKS() macro.
- asconf changes
o More comment changes/clarifications related to the old local address
"not" list which is now an explicit restricted list.

o Rename some functions for clarity:
- sctp_add/del_local_addr_assoc to xxx_local_addr_restricted()
- asconf related iterator functions to sctp_asconf_iterator_xxx()

o Fix bug when the same address is deleted and added (and removed from
the asconf queue) where the ifa is "freed" twice refcount wise,
possibly freeing it completely.

o Fix bug in output where the first ASCONF would not go out after the
last address is changed (e.g. only goes out when retransmitted).

o Fix bug where multiple ASCONFs can be bundled in the same packet with
the and with the same serial numbers.

o Fix asconf stcb iterator to not send ASCONF until after all work
queue entries have been processed.

o Change behavior so that when the last address is deleted (auto asconf
on a bound all endpoint) no action is taken until an address is
added; at that time, an ASCONF add+delete is sent (if the assoc
is still up).

o Fix local address counting so that address scoping is taken into
account.

o #ifdef SCTP_TIMER_BASED_ASCONF the old timer triggered sending
of ASCONF (after an RTO). The default now is to send
ASCONF immediately (except for the case of changing/deleting the
last usable address).
Approved by: re(ken smith)@freebsd.org


171440 14-Jul-2007 rrs

- Modular congestion control, with RFC2581 being the default.
- CMT_PF states added (w/sysctl to turn the PF version on)
- sctp_input.c had a missing incr of cookie case when the
auth was bad. This meant a free was called without an
increment to refcnt, added increment like rest of code.
- There was a case, unlikely, when the scope of the destination
changed (this is a TSNH case). In that case, it would not free
the alloc'ed asoc (in sctp_input.c).
- When listed addresses found a colliding cookie/Init, then
the collided upon tcb was not unlocked in sctp_pcb.c
- Add error checking on arguments of sctp_sendx(3) to prevent it from
referencing a NULL pointer.
- Fix an error return of sctp_sendx(3), it was returing
ENOMEM not -1.
- Get assoc id was changed to use the sanctified socket api
method for getting a assoc id (PEER_ADDR_INFO instead of
PEER_ADDR_PARAMS).
- Fix it so a peeled off socket will get a proper error return
if it trys to send to a different address then it is connected to.
- Fix so that select_a_stream can avoid an endless loop that
could hang a caller.
- time_entered (state set time) was not being set in all cases
to the time we went established.
Approved by: re(ken smith)


171197 04-Jul-2007 peter

Fix missing prototype warnings. (Compile errors with -Werror on)
When using namespace.h/un-namespace.h, you use _ versions of syscalls.
Change getsockopt() to _getsockopt() and same for setsockopt().

Approved by: re


171152 02-Jul-2007 rrs

- Removes some incorrect error returns (errno was being overriden in
one of the functions)
- Fixes the error return of sctp_get_opt, it was returning the errno not
-1.
Approved by: re@freebsd.org (Robert Watson)
Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com)


171039 26-Jun-2007 mjacob

Add missing semi-colon.

Approved by: re (not really, but it's better to have things compile than not for right now. Sorry)


171031 25-Jun-2007 rrs

- Fix wrong error return (the errno was being returned and not placed
in errno) - Found by Weongyo Jeong
- Remove two extra un-needed memset() after calloc()'s - Found by
Weongyo Jeong
- Tightened up parameter requirement checking on input to
bindx/connectx per socket api spec.
Approved by: re@freebsd.org(Ken Smith)


170993 22-Jun-2007 rrs

- Fix incorrect error return on sctp_getaddrlen
- Fix a memory leak when a non v4/v6 address was passed in.
- Take out strange line that copy's back to the src array
incorrectly (corrupting the input array).

Approved by: re(bmah@freebsd.org)
Obtained from: Weongyo Jeong(weongyo.jeong@gmail.com)


170956 19-Jun-2007 brueffer

Clean up after previous commit: new sentence -> new line, no empty lines,
.Fa macro usage.

Approved by: re (blanket)


170955 19-Jun-2007 rrs

- Fix the signature of sctp_connectx to match the function and adds some
text about the last argument.
Approved by: re (bmah@freebsd.org)


170919 18-Jun-2007 brueffer

Major cleanup: mdoc macros, style, typos etc.


170715 14-Jun-2007 delphij

Require users to provide a length information for inet_ntoa_r,
this is common on other platforms.

Reported by: pointyhat via kris


170639 12-Jun-2007 ache

Fix yet another (make install) stopper with wrong sourcefilter.3 links


170634 12-Jun-2007 bms

Fix typo in filename from mismerged earlier rev of this file.


170625 12-Jun-2007 bms

Fix a typo which crept in from an earlier version of this file.


170620 12-Jun-2007 bms

Add missing userland support files from previous commit for the new
multicast source filter API functions.


170613 12-Jun-2007 bms

Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
* IPv4 multicast socket processing is now moved out of ip_output.c
into a new module, in_mcast.c.
* The in_mcast.c module implements the IPv4 legacy any-source API in
terms of the protocol-independent source-specific API.
* Source filters are lazy allocated as the common case does not use them.
They are part of per inpcb state and are covered by the inpcb lock.
* struct ip_mreqn is now supported to allow applications to specify
multicast joins by interface index in the legacy IPv4 any-source API.
* In UDP, an incoming multicast datagram only requires that the source
port matches the 4-tuple if the socket was already bound by source port.
An unbound socket SHOULD be able to receive multicasts sent from an
ephemeral source port.
* The UDP socket multicast filter mode defaults to exclusive, that is,
sources present in the per-socket list will be blocked from delivery.
* The RFC 3678 userland functions have been added to libc: setsourcefilter,
getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
* Definitions for IGMPv3 are merged but not yet used.
* struct sockaddr_storage is now referenced from <netinet/in.h>. It
is therefore defined there if not already declared in the same way
as for the C99 types.
* The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
which are then interpreted as interface indexes) is now deprecated.
* A patch for the Rhyolite.com routed in the FreeBSD base system
is available in the -net archives. This only affects individuals
running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
* Make IPv6 detach path similar to IPv4's in code flow; functionally same.
* Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from: p4://bms_netdev
Submitted by: Wilbert de Graaf (original work)
Reviewed by: rwatson (locking), silence from fenner,
net@ (but with encouragement)


170580 11-Jun-2007 rrs

- Validate incoming addresses and sizes for connectx and bindx.
- For non-sys call version pass the msg_flags.


170548 11-Jun-2007 delphij

Add inet_ntoa_r, a reentrant version of inet_ntoa. This is
available on a lot of platforms, as well as libkern for years.

Submitted by: "MQ"


170379 06-Jun-2007 remko

Document getaddrinfo(3)'s AI_ADDRCONFIG

PR: docs/78357
Submitted by: Matthias Andree <matthias dot andree at gmx dot de>
Patch by: asmodai
MFC after: 1 week


170154 31-May-2007 deischen

Some libc symbol map cleanups.

net: endhostdnsent is named _endhostdnsent and is
private to netdb family of functions.

posix1e: acl_size.c has been never compiled in,
so there's no "acl_size".

rpc: "getnetid" is a static function.

stdtime: "gtime" is #ifdef'ed out in the source.

some symbols are specific only to some architectures,
e.g., ___tls_get_addr is only defined on i386.

__htonl, __htons, __ntohl and __ntohs are no longer
functions, they are now (internal) defines in
<machine/endian.h>.

Submitted by: ru


170057 28-May-2007 rwatson

Precede symbol names consistently with tabs rather than spaces.


169980 25-May-2007 ru

Also fix the misspelling of hes_resolve().

Submitted by: Danny Braniss


169935 24-May-2007 ru

hesiod_resolv -> hesiod_resolve

Submitted by: Danny Braniss


169679 18-May-2007 jon

Move nss_compat symbols from r1.11 to private section of symbol map.

Suggested by: deischen


169665 18-May-2007 jon

__nss_compat_* from net/nss_compat.c are needed by ports/net/nss_ldap, so export them.


169644 17-May-2007 jon

fix memory leak from reading nsswitch.conf

MFC after: 1 week


169623 16-May-2007 rrs

-Fix so getoptinfo() is in conformance with socket api (it
can be used on any read socketopt).
-Clean up of sendmsg call and make it conformant when no syscall
is available.


169622 16-May-2007 rrs

Resolves symbols map so sctp_xxx() functions are included.
PR: 112704
Submitted by: kou@cozmixng.org


169528 13-May-2007 rwatson

Add ether_aton_r and ether_ntoa_r to public symbol map for libc.

Pointed out by: deischen


169522 13-May-2007 rwatson

Add and document ether_ntoa_r() and ether_aton_r() functions, which accept
passed storage buffers rather than using static storage. Reimplement
ether_ntoa() and ether_aton() in terms of these functions. These variants
are thread-safe.


169520 13-May-2007 rwatson

Move to more conformant style(9) before making functional changes.


169092 29-Apr-2007 deischen

Use C comments since we now preprocess these files with CPP.


168867 19-Apr-2007 mtm

Make inet6_rth_* family of functions more compliant with RFC3542:
1. CMSG_NXTHDR(mhdr, cmsg) is supposed to dereference cmsg and return
the next header in the chain. If cmsg is NULL it should return
the first header, behaving essentially like CMSG_FIRSTHDR().
2. inet6_rth_(space|init|add) should do basic checking on their input
to verify that the number of headers (segments) is
between 0 and 127 inclusive.

MFC-After: 1 month


167759 21-Mar-2007 mlaier

Let people in on the magic of INET[6]_ADDRSTRLEN which comes quite handy in
combination with inet_ntop().

Reviewed by: trhodes "works for me"


167598 15-Mar-2007 rrs

- Sysctl's move to seperate file
- moved away from ifn/ifa access to sctp_ifa/sctp_ifn
built and managed by the add-ip code.
- cleaned up add-ip code to use the iterator
- made iterator be a thread, which enables auto-asconf now.
- rewrote and cleaned up source address selection (also
made it use new structures).
- Fixed a couple of memory leaks.
- DACK now settable as to how many packets to delay as
well as time.
- connectx() to latest socket API, new associd arg.
- Fixed issue with revoking and loosing potential to
send when we inflate the flight size. We now inflate
the cwnd too and deflate it later when the revoked
chunk is sent or acked.
- Got rid of some temp debug code
- src addr selection moved to a common file (sctp_output.c)
- Support for simple VRF's (we have support for multi-vfr
via compile switch that is scrubbed from BSD but we won't
need multi-vrf until we first get VRF :-D)
- Rest of mib work for address information now done
- Limit number of addresses in INIT/INIT-ACK to
a #def (30).

Reviewed by: gnn


167122 28-Feb-2007 bms

Document the AF_LINK extension which was imported from NetBSD.


167121 28-Feb-2007 bms

Nuke ascii2addr() and addr2ascii(). They have no consumers anywhere
in FreeBSD, and originated from INRIA IPv6.

Stub out netstat reference to addr2ascii() I mistakenly introduced.
Update misleading man page sections.

Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to
print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394
bits which don't map directly to our code.

Obtained from: NetBSD (getnameinfo.c)
Discussed on: current (March 2006)


167017 26-Feb-2007 rrs

Fix include declaration it was sys/sctp.h should be netinet/sctp.h,
reported by pluknet@gmail.com.


166887 22-Feb-2007 rrs

Fixes build breakage.. invalid type casts.. and invalid
type for size in one place.


166886 22-Feb-2007 rrs

First cut of the sctp man pages. Still need work.


166885 22-Feb-2007 rrs

Fixes __FreeBSD__ being present (they should not)
and also trailing garbage on undef of magic numbers.


166884 22-Feb-2007 rrs

Adds a performance improvement for when sctp_sendx is
called with only one address, we then can call the
generic system call. Also fixes some socket api
type issues and cleans up the "magic" numbers that
were being used in the code.

Reviewed by: gnn


166168 22-Jan-2007 bms

Docuemnt exactly which functions access which NSS databases.

Point out that FreeBSD libc has compat stubs for GNU glibc NSS
modules which access NSDB_PASSWD/NSDB_GROUP, but not NSDB_HOSTS;
based on painful experience porting nss_mdns.

Reviewed by: ru


165903 09-Jan-2007 imp

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


165270 16-Dec-2006 rodrigc

Consistently use a socklen_t type where required, and eliminate
GCC warning "dereferencing type-punned pointer will
break strict-aliasing rules".

Reviewed by: rrs


165242 15-Dec-2006 rrs

This adds the "system calls"
sctp_getaddrlen()
sctp_connectx()
sctp_bindx()
sctp_opt_info()
sctp_getpaddrs()
sctp_freepaddrs()
sctp_getladdrs()
sctp_freeladdrs()
sctp_sendmsg()
sctp_getassocid()
sctp_send()
sctp_sendx()
sctp_sendmsgx()
sctp_recvmsg()
sctp_peeloff()

Manual pages will be forthcoming (and the commit to porters-handbook)


164882 04-Dec-2006 ume

Use _kevent() instead of kevent().

Requested by: nork


164053 06-Nov-2006 cognet

Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by: bde


163982 04-Nov-2006 lawrance

Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue.

PR: doc/50573
Submitted by: Ronald F.Guilmette <rfg@monkeys.com>
Reviewed by: trhodes
MFC after: 3 days


163737 28-Oct-2006 ru

Add missing markup bits.

Submitted by: Emil Mikulic


162385 17-Sep-2006 ru

Markup fixes.


160700 26-Jul-2006 yar

Respect MK_INET6_SUPPORT.


160699 26-Jul-2006 yar

Fix build w/o INET6.

Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>


160593 23-Jul-2006 ume

do not overload the port number on to the return value of
str2number(). this could result in an unexpected code path.

Obtained from: KAME
MFC after: 1 week


160586 23-Jul-2006 ume

stop use of mutex lock in ICMP lookup.

MFC after: 1 week


160577 22-Jul-2006 ume

remove obsolete comments.

MFC after: 3 days


160553 21-Jul-2006 ume

simplification in explore_numeric: unified the post-process with
GET_AI and GET_PORT. Commented on an impossible case.

Obtained from: KAME
MFC after: 1 week


160552 21-Jul-2006 ume

RFC3493 requires use of inet_aton for AF_INET.

Obtained from: KAME
MFC after: 1 week


160551 21-Jul-2006 ume

clean-up: rewrote explore_null and explore_numeric without using sentinel.
we do not need it since we make (at most) a single addrinfo entry in these
cases.

Obtained from: KAME
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


160427 17-Jul-2006 stefanf

Use a prototype for res_init().

MFC after: 3 days


158791 21-May-2006 ume

Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after: never


158790 21-May-2006 ume

Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short. This conforms to RFC3493, POSIX and XPG6.

Obtained from: NetBSD


158787 21-May-2006 ume

Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after: never


158477 12-May-2006 ume

Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:

http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch. So, we fix it
on 32 bit arch only for now.

Reported by: Rostislav Krasny <rosti.bsd@gmail.com>


158257 02-May-2006 ume

Fix alignment problem on AMD64.

Reported by: Pascal Hofstee <caelian__at__gmail.com>
Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Tested by: Pascal Hofstee <caelian__at__gmail.com>


158190 30-Apr-2006 ume

`cache' couldn't co-exist with `compat'.

Submitted by: "Michael Bushkov" <bushman__at__rsu.ru>


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


157779 15-Apr-2006 ume

- make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by: arch@ and current@ (no objection)


157371 01-Apr-2006 ume

fix indent.


157308 30-Mar-2006 ume

Expose res_update and friends again. At least, ports/mail/spamilter
uses them.
Now, we have res_nupdate and res_nmkupdate as well, but they are
still based on our old resolver for binary backward compatibility.
So, they don't provide new features such as TSIG support.

Reported by: pointyhat via kris


157203 28-Mar-2006 ume

If the query choked with EDNS0, retry without EDNS0.

Obtained from: res_nquery() of BIND9.


157119 25-Mar-2006 ume

- Use ANSI C prototype.
- Remove trailing space.


157093 24-Mar-2006 ume

When res_nquerydomain() returns SERVFAIL, we should try next domain.


157081 24-Mar-2006 ume

When res_send() fails, we should reserve an error code.


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)


156946 21-Mar-2006 delphij

When we are doing initialization against q, use its own size, not
the size of q2. This should be a no-op because q and q2 are of
the same type.

Submitted by: Alexey Dobriyan <adobriyan gmail com>


156813 17-Mar-2006 ru

Reimplementation of world/kernel build options. For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)


156669 13-Mar-2006 deischen

ns_name_skip was recently redefined to __ns_name_skip
like the others in <include/arpa/nameser.h>.

Submitted by: ume


156613 13-Mar-2006 deischen

Add each directory's symbol map file to SYM_MAPS.


156608 13-Mar-2006 deischen

Add symbol maps and initial symbol version definitions to libc.

Reviewed by: davidxu


156155 01-Mar-2006 ume

Handle the errors returned by res_querydomain() in same manner.

Reported by: yar
Tested by: yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after: 1 week


156089 27-Feb-2006 deischen

Correct a comment.

Staticize two tables thare are not visible in <resolv.h>
and which are also local in Solaris' libresolv.

Remove two functions that are not referenced in libc nor
anywhere else I can find, not visible in <resolv.h> and
which are also local in Solaris libresolv.


156018 26-Feb-2006 ume

Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
an IPv6 support.

PR: kern/93740
Submitted by: Rudolf Cejka <cejkar__at__fit.vutbr.cz>
Obtained from: BIND9
MFC after: 1 week


155983 24-Feb-2006 ume

- Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

PR: bin/62139
Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Tested by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from: BIND9 (with some modification)
MFC after: 1 week


152717 23-Nov-2005 ru

Fix inet6_opt_get_val() prototype.


152712 23-Nov-2005 ru

Add missing includes.


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


149313 20-Aug-2005 stefanf

Include <sys/types.h> and <limits.h> ourselves, don't assume they are included
through <pthread.h>.

gen/sem.c: Prerequisite for <_semaphore.h>
net/getprotoent.c: USHRT_MAX
net/getservent.c: USHRT_MAX
stdio/ungetwc.c: MB_LEN_MAX
stdio/vfwscanf.c: MB_LEN_MAX


148796 06-Aug-2005 phk

Respect the YES_HESIOD build variable.


148580 31-Jul-2005 keramida

Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after: 1 week
Thanks to: Music band ``Chingon''
for keeping me company while searching for these.


148446 27-Jul-2005 ume

don't accept invalid form of an address like 1:2:3:4:5:6:7::8.

PR: bin/84106
Obtained from: BIND9
MFC after: 2 days


148308 22-Jul-2005 ume

Remove padding for ABI compatibility of ai_addrlen member
from struct addrinfo. This change break ABI compatibility
on 64 bit arch.


148160 19-Jul-2005 ume

refer RFC 3542 rather than RFC 2292bis.

Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from: KAME


148159 19-Jul-2005 ume

fixed the validation code of routing header length in inet6_rth_getaddr().
reported by Delia Kecskemeti <delia.kecskemeti__at__windriver.com>

Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from: KAME


147434 16-Jun-2005 ru

Markup fixes.

Approved by: re


147402 15-Jun-2005 ru

Assorted markup fixes.

Approved by: re


147270 10-Jun-2005 nectar

Remove rexecd(8), a server that implements a particularly insecure
method of executing commands remotely. There are no rexec clients in
the FreeBSD tree, and the client function rexec(3) is present only in
libcompat. It has been documented as "obsolete" since 4.3BSD, and its
use has been discouraged in the man page for over 10 years.


146911 03-Jun-2005 ume

reflect type change of n_net and getnetbyaddr(3).


146904 03-Jun-2005 ume

- Remove padding for ABI compatibility of n_net member from struct
netent.
- Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit
arch as well to confirm to POSIX-2001.

These changes break ABI compatibility on 64 bit arch.
There is similar padding issue for ai_addrlen of struct addrinfo.
However, it is leaved as is for now.

Discussed on: arch@, standards@ and current@
X-MFC after: never


146700 27-May-2005 ume

reduce cast.

MFC after: 1 week


146244 15-May-2005 ume

- The ai_addrlen of a struct addrinfo used to be a size_t, per
RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC
3493, it was changed to a socklen_t. And, the n_net of a
struct netent used to be an unsigned long integer. In XNS5,
and subsequently in POSIX-2001, it was changed to an uint32_t.
To accomodate for this while preserving ABI compatibility with
the old interface, we need to prepend or append 32 bits of
padding, depending on the (LP64) architecture's endianness.
- Correct 1st argument of getnetbyaddr() to uint32_t on 32
bit arch. Stay as is on 64 bit arch for ABI backward
compatibility for now.

Reviewed by: das, peter
MFC after: 2 weeks


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.


146190 13-May-2005 ume

free ypbuf only when yp_match() succeed.


146187 13-May-2005 ume

NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.


145831 03-May-2005 ume

fix signed/unsigned comparison warnings.

Obtained from: NetBSD


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.


145756 01-May-2005 ume

don't see RES_USE_INET6 when called from getipnodeby*().


145728 30-Apr-2005 ume

oops, gethostbyaddr(3) must return h_addr as an IPv4-mapped
IPv6 address when RES_USE_INET6 was set, according to RFC 2133
section 6.2.


145724 30-Apr-2005 ume

handling RES_USE_INET6 better.


145723 30-Apr-2005 ume

_ht_gethostbyaddr didn't handle RES_USE_INET6 correctly.


145721 30-Apr-2005 ume

_gethostbynisname() didn't support RES_USE_INET6.


145715 30-Apr-2005 ume

_ht_gethostbyname didn't handle RES_USE_INET6 correctly.


145687 29-Apr-2005 ume

- do validation check and IPv4-mapped IPv6 address handling before
any query.
- don't query against IPv6 link-local address.
- use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros.
- use memcpy() instead of bcopy().

Inspired by: NetBSD


145684 29-Apr-2005 ume

NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.


145680 29-Apr-2005 ume

our get{addr,name}info() is considered thread-safe.


145677 29-Apr-2005 ume

we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.


145635 28-Apr-2005 ume

sync _map_v4v6_host*() with bind9's. it treats align better bit.

Obtained from: BIND9


145634 28-Apr-2005 ume

we don't need mutex lock to call _gethostbynis*(), anymore.


145633 28-Apr-2005 ume

make gethostby*() thread-safe.


145632 28-Apr-2005 ume

_gethostbynis{addr,name}() can handle an IPv6, now.


145626 28-Apr-2005 ume

make getnetby*() thread-safe.


145602 27-Apr-2005 ume

hide implementation specific internal functions from netdb.h.
it is needed to make get{host,net}by*() thread-safe.


145564 26-Apr-2005 ume

our get{proto,serv}by*() use a thread-specific data space.


145550 26-Apr-2005 ume

add IPv6 awareness for NIS query of gethostby*().

Inspired by: NetBSD


145512 25-Apr-2005 ume

ensure parsing numeric address before any host query.

Inspired by: NetBSD


145505 25-Apr-2005 ume

remove unused variable.


145477 24-Apr-2005 ume

if last line didn't have trailing space, network address was also
treated as an alias.


145279 19-Apr-2005 ume

- add getproto{byname,bynumber,ent}_r for internal use within libc.
- make getproto{byname,bynumber,ent} thread-safe.


145271 19-Apr-2005 ume

- nuke deprecated and unused getnodeby(3).
- remove unused variable.

Obtained from: KAME


145245 18-Apr-2005 ume

rename the NIS related fields to have yp_ prefix.

Suggested by: delphij


145220 18-Apr-2005 delphij

Do not check whether a pointer is NULL, since free(3) already takes care of
this case.

Reviewed by: ume


145194 17-Apr-2005 delphij

Fix build for !YP case.

BTW. Shall we change these fields to have yp_ prefix? That will make the
code easier to read.


145192 17-Apr-2005 ume

libc-internal interfaces should have two underscores in front
of their names.

Pointed out by: das


145179 17-Apr-2005 delphij

Wrong working directory, sorry. The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to: me


145178 17-Apr-2005 delphij

Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3). POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR: standards/80008
Requested by: Xin Liu <lx@knight.6test.edu.cn>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks


145118 15-Apr-2005 ume

Now, our getservbyname(3) is thread-safe. So, we don't need
to protect it with mutex lock.


145117 15-Apr-2005 ume

- add getserv{byname,byport,ent}_r for internal use within libc.
- make getserv{byname,byport,ent} thread-safe.

Reviewed by: gnn


145113 15-Apr-2005 ume

hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

Obtained from: BIND9


145066 14-Apr-2005 ume

remove needless res_init() call.

Inspired by: NetBSD


144839 09-Apr-2005 ume

unbreak build without YP defined.

Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>


144816 08-Apr-2005 stefanf

Remove unused variables and assignments.


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.


144708 06-Apr-2005 ume

separate gai_strerror(3) from getaddrinfo.c.

Requested by: phantom


144679 05-Apr-2005 ume

make yp stuff re-entrant.

Obtained from: NetBSD


144673 05-Apr-2005 ume

add missing mutex unlock.


144634 04-Apr-2005 ume

make _files_getaddrinfo() re-entrant.

Obtained from: NetBSD


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.


143886 20-Mar-2005 simon

Add byteorder(9) to SEE ALSO.

MFC after: 3 days


141920 14-Feb-2005 stefanf

- Use socklen_t.
- No need for two instances of 'num'.


141918 14-Feb-2005 stefanf

Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.


141908 14-Feb-2005 phantom

. Convert return type of gai_strerror() to 'const char *' as POSIX requires.
. Convert ai_errlist[] to simple 'char *' array, and appropriately
optimize gai_strerror()


141907 14-Feb-2005 phantom

EAI_ADDRFAMILY and EAI_NODATA are obsoleted, and not definined anymore,
so do not export these definitions via manual page


141846 13-Feb-2005 ru

Expand *n't contractions.


141580 09-Feb-2005 ru

Fixed the misplaced $FreeBSD$.


140947 28-Jan-2005 ume

use strdup().

Obtained from: KAME
MFC after: 1 week


140910 27-Jan-2005 ume

make _getipnodebyname_multi() static.


140908 27-Jan-2005 ume

implement AI_NUMERICSERV (as defined in RFC3493).

Obtained from: KAME
MFC after: 1 week


140906 27-Jan-2005 ume

fill ai_canonname field for numeric hostname, by the given hostname.
follow new recommendation in RFC3493.

Obtained from: KAME
MFC after: 1 week


140896 27-Jan-2005 ume

query A RR before AAAA RR.

MFC after: 1 week


140750 24-Jan-2005 ru

Markup and grammar fixes.


140727 24-Jan-2005 gnn

Update man pages to be in line with guidelines for IPv6 in FreeBSD.

FreeBSD currently implements the most up to date IPv6 APIs for
option and route header parsing. This checkin marks the older APIs
as deprecated and points the reader to the newer pages.

Reviewed by: Jun-ichiro Itojun
Approved by: rwatson (mentor)


140690 24-Jan-2005 gnn

Fix a dangling MKLINK from my last commit.

Approved by: rwatson (mentor)


140668 23-Jan-2005 gnn

Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Reviewed by: Kame Project (including Itojun-san, Jinmei-san and Suzuki-san)
Approved by: Robert Watson (robert at freebsd dot org)
Obtained from: Kame Project and OpenBSD

Replace manual pages that may have violated the IETF's Copyright.

All come from the Kame tree.

Several were from OpenBSD except for ip6.4, and the inet6* pages which were
rewritten by me.

All of the text is new and drawn from reading the code and
documentation.


140665 23-Jan-2005 gnn

Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Approved by: Robert Watson (robert at freebsd dot org)

Remove files in preparation for replacement with totally new versions
of the manual pages.

Update the Makefile to handle the new file to be added.


140505 20-Jan-2005 ru

Sort sections.


140295 15-Jan-2005 ru

Eliminate macro calls inside literal displays.


140081 11-Jan-2005 ru

Scheduled mdoc(7) sweep.


139612 03-Jan-2005 sobomax

Don't ignore the last line of config file (/etc/hosts, /etc/services, etc)
which doesn't end in \n, since it may be very confusing. Also this should
increase consistency, since most other config files work just fine regardless
of the presence of traling \n in the last line.

MFC After: 2 weeks


139389 29-Dec-2004 trhodes

Various markup and spelling fixes.

PR: 75574
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)


137675 13-Nov-2004 bz

Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks


136331 09-Oct-2004 maxim

o Backout rev. 1.16, see 1.3 commit log for more info.

Requested by: bde

o Remove unneeded sys/types.h and netinet/in.h from the synopsis and
the example.
o We do have struct in_addr in arpa/inet.h, so no need for netinet/in.h.
o Mention where AF_* constants defined are.

Educated by: bde


135935 29-Sep-2004 maxim

Reflect the fact addr2ascii(3) and ascii2addr(3) need sys/socket.h
for AF_* constants.

Submitted by: Matthew George
MFC after: 2 weeks


135000 09-Sep-2004 yar

Use the recently introduced RES_DFLRETRY parameter instead of a well-hidden
constant for the default number of retries.


133218 06-Aug-2004 roam

Bump the document date, since the content changed today.

Discussed with: ru


133209 06-Aug-2004 roam

Cross-reference getnameinfo(3), getaddrinfo(3), getipnodebyname(3) and
getipnodebyaddr(3).

PR: 54229
Submitted by: Samuel Tardieu <sam@inf.enst.fr>
MFC after: 2 weeks


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


131758 07-Jul-2004 ru

Markup nits.


131611 05-Jul-2004 ru

Markup fixes.


131539 03-Jul-2004 ru

Eliminate double whitespace.


131504 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


131365 30-Jun-2004 ru

Markup, grammar, and spelling fixes.


130873 21-Jun-2004 mpp

Spelling fixes.


130600 16-Jun-2004 ume

Rename variable name from `name' to `hostname'.
This is a corresponding change to bin/67994. I'll soon commit
bin/67994 into 4-STABLE. Actually, 5-CURRENT's getaddrinfo()
doesn't have the problem mentiond in bin/67994. However, it is
good to be in sync variable name with 4-STABLE and KAME.

PR: bin/67994
Submitted by: JINMEI Tatuya <jinmei@ocean.jinmei.org>


130469 14-Jun-2004 bms

Date bump.

Requested by: krion


130468 14-Jun-2004 bms

Document some return values.

PR: bin/22198
Submitted by: Nick Johnson (with cleanups)


129984 02-Jun-2004 ume

use source address as a hint to determine destination address
by getipnodebyname().


129957 01-Jun-2004 brooks

Add Aerospace Corporation copyrights to EUI64 support files.

Suggested by: marcel, imp


129905 31-May-2004 ume

Treat IPv4 private address as global scope rather than site scope.
Though it breaks RFC 3484, without this change, dest addr selection
doesn't work well under NAT environment.


129901 31-May-2004 ume

use source address as a hint to determine destination address.

Obtained from: KAME


129759 26-May-2004 brooks

Add support for an /etc/eui64 file modeled on /etc/ethers. The API is
modeled on ethers(3) except that all functions are thread-safe.

Reviewed by: simokawa


128517 21-Apr-2004 ru

Unbreak world.


128507 21-Apr-2004 njl

MFdragonfly: resolver fix for timeouts on unqualified hostnames

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.

Obtained from: DragonFly
MFC after: 3 weeks


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


127727 01-Apr-2004 nectar

The previous commit changed the behavior of nsdispatch() in the
case where an /etc/nsswitch.conf file was present, but could not
be opened (e.g. due to permissions). Previously, the open failure
condition was suppressed, and the built-in defaults were used. In
revision 1.11, however, propagated the open failure causing all
nsdispatch() invocations to return NS_UNAVAIL, and thus many APIs
including getpwnam and gethostbyname unconditionally failed.

This commit restores the previous behavior.

Pointy hat: nectar (+1 for obstinance; ache had to use clue bat)
Reported by: ache


127625 30-Mar-2004 nectar

When a dynamic NSS module is built and linked against a thread
library, it may pull in that thread library at run time. If the
process started out single-threaded, this could cause attempts to
release locks that do not exist. Guard against this possibility by
checking __isthreaded before invoking thread primitives.

A similar problem remains if the process is linked against one thread
library, but the NSS module is linked against another. This can only
be avoided by careful design of the NSS module.

Submitted by: Sean McNeil <sean@mcneil.com> (mostly; bugs are mine)


127028 15-Mar-2004 des

Don't try to pass off a struct sockaddr as a struct sockaddr_in when it
may in fact very well be a struct sockaddr_in6. Just use plain struct
sockaddr.

This brings us yet another step closer to a clean -O2 build.


127012 15-Mar-2004 des

Make this compile with -O2. A proper fix would use a struct to represent
vectors, instead of requiring the caller to keep track of element size
and count and pass them in by reference.


127011 15-Mar-2004 des

Whitespace nits.


126643 05-Mar-2004 markm

Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64


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.


125667 10-Feb-2004 cperciva

style cleanup: Remove duplicate $FreeBSD$ tags.

These files had tags at the start of the file
(incorrect, removed), and after the copyright
notices (correct).

Approved by: rwatson (mentor)


125562 07-Feb-2004 ru

Unbreak world.


125555 07-Feb-2004 dds

getnetbyname fixes:
Do not choke on malformed network addresses.
Return n_name in static space, not on the function's stack.

MFC after: 1 week


124289 09-Jan-2004 nectar

It was reported that when using nss_ldap, getgrent(3) would behave
incorrectly when encountering `large' groups (many members and/or many
long member names). The reporter tracked this down to the glibc NSS
module compatibility code (nss_compat.c): it would prematurely record
that a NSS module was finished iterating through its database in some
cases.

Two aspects are corrected:

1. nss_compat.c recorded that a NSS module was finished iterating
whenever the module reported something other than SUCCESS. The
correct logic is to continue iteration when the module reports
either SUCCESS or RETURN. The __nss_compat_getgrent_r and
__nss_compat_getpwent_r routines are updated to reflect this.

2. An internal helper macro __nss_compat_result is used to map glibc
NSS status codes to BSD NSS status codes (e.g. NSS_STATUS_SUCCESS ->
NS_SUCCESS). It provided the obvious mapping.

When a NSS routine is called with a too-small buffer, the
convention in the BSD NSS code is to report RETURN. (This is used
to implement reentrant APIs such as getpwnam_r(3).) However, the
convention in glibc for this case is to set errno = ERANGE and
overload TRYAGAIN. __nss_compat_result is updated to handle this
case.

PR: bin/60287
Reported by: Lachlan O'Dea <odela01@ca.com>


124177 06-Jan-2004 nectar

Work around a `warning: zero-length printf format string'.


123236 07-Dec-2003 murray

Add support for timeout: and attempts: resolver options.

Submitted by: Paul Vixie <paul@vix.com> / ISC
MFC After: 1 week


122687 14-Nov-2003 bms

Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function,
getifmaddrs(), is added to retrieve current multicast group memberships.

Reviewed by: harti


122682 14-Nov-2003 ume

u_int8_t cannot carry a number greater than 255.

Reported by: nectar


121747 30-Oct-2003 ume

add destination address selection described in RFC3484.
in KAME implementation, even when no policy is installed
into kernel, getaddrinfo(3) sorts addresses. Since it
causes POLA violation, I modified to don't sort addresses
when no policy is installed into kernel,

Obtained from: KAME


121496 25-Oct-2003 ume

according to RFC3542 10.5, the 5th argment of inet6_opt_next()
is not size_t but socklen_t.

Reported by: tinderbox


121474 24-Oct-2003 ume

oops, revert previous change to getaddrinfo.c. This is not related
to RFC3493. The previous change was related to RFC3484 (Default
Address Selection for IPv6), and it will come later.


121472 24-Oct-2003 ume

Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis). Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from: KAME


121426 23-Oct-2003 ume

reorder functions to be in sync with KAME.


121425 23-Oct-2003 ume

EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493
(aka RFC2553bis). Now, getaddrinfo(3) returns EAI_NONAME
instead of EAI_NODATA. Our getaddrinfo(3) nor getnameinfo(3)
didn't use EAI_ADDRFAMILY.

Obtained from: KAME


121348 22-Oct-2003 ume

oops, gai_strerror must return default value when error code
isn't found in ai_errlist.


121347 22-Oct-2003 ume

make ai_errlist struct. this is preparation for RFC3493
(EAI_NODATA is depricated).

Obtained from: KAME


121316 21-Oct-2003 ume

stop use of NI_WITHSCOPEID. it was deprecated.

Obtained from: KAME


120107 15-Sep-2003 fenner

From OpenBSD:
always widen the imputed netmask if it is narrower than the specified octets.
fixes a strange behaviour where inet_net_pton would always return 4 (bits)
for multicast addresses no matter how many octets were specified.

negotiated with Paul Vixie, original author of this function.

PR: standards/53151
Submitted by: Max Laier <max@love2party.net>
Optained from: OpenBSD


120084 15-Sep-2003 ume

Our getaddrinfo() and getnameinfo() are thread-safe but
some limitation.

Reported by: Marc G. Fournier <scrappy@hub.org>


119964 10-Sep-2003 ru

mdoc(7): Properly mark C headers.


119893 08-Sep-2003 ru

mdoc(7): Use the new feature of the .In macro.


118011 25-Jul-2003 mux

An u_int8_t can never be bigger than 255, so remove a useless check.

Spotted by: GCC


116574 19-Jun-2003 kris

Remove bogus non-reentrant "temporary" implementation of gethostbyaddr_r()
that has been here for 6 years and 9 months.

Reviewed by: deischen
MFC After: 1 week


116022 08-Jun-2003 charnier

.Xr -> .Lb for librairy. There is no manual page corresponding to .Xr.


115225 22-May-2003 ru

Assorted mdoc(7) fixes.

Approved by: re (blanket)


115143 18-May-2003 ru

Fixed troff(1) and mdoc(7) warnings.

Approved by: re (blanket)


114681 04-May-2003 deischen

Replace use of a spinlock with a mutex.


114443 01-May-2003 nectar

Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.


114256 29-Apr-2003 nectar

`Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by: qpopper's interfering and buggy version of strlcpy


113983 24-Apr-2003 nectar

Don't complain about missing NSS methods when built statically. It is
annoying and not very useful.

Sponsored by: DARPA, Network Associates Laboratories


113977 24-Apr-2003 nectar

Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by
namespace.h.

Sponsored by: DARPA, Network Associates Laboratories


113976 24-Apr-2003 nectar

Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by
namespace.h.

Sponsored by: DARPA, Network Associates Laboratories


113595 17-Apr-2003 nectar

= Implement name service switch modules (NSS modules). NSS modules
may be built into libc (`static NSS modules') or dynamically loaded
via dlopen (`dynamic NSS modules'). Modules are loaded/initialized
at configuration time (i.e. when nsdispatch is called and nsswitch.conf
is read or re-read).

= Make the nsdispatch(3) core thread-safe.

= New status code for nsdispatch(3) `NS_RETURN', currently used to
signal ERANGE-type issues.

= syslog(3) problems, don't warn/err/abort.

= Try harder to avoid namespace pollution.

= Implement some shims to assist in porting NSS modules written for
the GNU C Library nsswitch interface.

Sponsored by: DARPA, Network Associates Laboratories


111920 05-Mar-2003 peter

Remove NS and ISO stuff.


111778 03-Mar-2003 obrien

Restore vendor ID.


111618 27-Feb-2003 nectar

Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.


111082 18-Feb-2003 nectar

Whack 28 unused variables.


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


110440 06-Feb-2003 charnier

The .Fn function


108711 05-Jan-2003 fenner

Use in_addr_t for the right size of an IPv4 address, and copy into
an unaligned destination using bcopy instead of an assignment.

Submitted by: Hartmut Brandt <brandt@fokus.gmd.de>
PR: sparc64/46729


108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


108317 27-Dec-2002 schweikh

english(4) police.


108087 19-Dec-2002 ru

mdoc(7) police: "The .Fa argument.".


108040 18-Dec-2002 ru

mdoc(7) police: Fixed abuses of the .Ar and .Em macros.


108037 18-Dec-2002 ru

mdoc(7) police: "The .Fn function".


107864 14-Dec-2002 ru

mdoc(7) police: markup overhaul.


107836 13-Dec-2002 fenner

Add an implementation of the POSIX.1 sockatmark(3).


107796 12-Dec-2002 trhodes

Fix the HISTORY to match reality. They were never MFC'ed to 4.X.

Submitted by: R. Imura <imura@ryu16.org>
Approved by: re (murray)


107619 04-Dec-2002 ru

Consistently mark std(in|out|err) with .Dv, because that's how they
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".

Approved by: re


107387 29-Nov-2002 ru

mdoc(7) police: formatting nits.

Approved by: re


107378 28-Nov-2002 ume

try SIOCGIFINDEX 1st to be able to use network aliasing.

Submitted by: jlemon
Approved by: re


107052 18-Nov-2002 ru

libc_r wasn't so tied to libc for 22 months.


106000 26-Oct-2002 ume

query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.

MFC after: 5 days


105943 25-Oct-2002 ume

- scopeid is u_int32_t
- strtoul pedant. pointed out by deraadt

Obtained from: KAME
MFC after: 1 week


105940 25-Oct-2002 ume

- kill strcpy
- port range check need to be done before htons. from deraadt
- %d/%u audit
- correct bad practice in the code - it uses two changing variables
to manage buffer (buf and buflen). we eliminate buflen and use
fixed point (ep) as the ending pointer.
- use snprintf, not sprintf
- pass correct name into q.name. from lukem@netbsd
- sync comment

Obtained from: KAME
MFC after: 1 week


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


104415 03-Oct-2002 ume

Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf. So, I didn't touch res_query.c.


103949 25-Sep-2002 mike

Use the standardized CHAR_BIT constant instead of NBBY in userland.


103630 19-Sep-2002 nectar

Add forgotten newlines in debug messages.


103401 16-Sep-2002 ume

Allocate 64K recieve buffer for DNS responses.


103357 15-Sep-2002 ume

Allocate 64K recieve buffer for DNS responses.
KAME did the modification only to _dns_getaddrinfo(). However,
it is not sufficient, and res_queryN() should be modified, too.
So, I did same modification to res_queryN().

Obtained from: KAME


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


103320 14-Sep-2002 ume

Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.

Obtained from: KAME


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


103012 06-Sep-2002 tjr

Style: One space between "restrict" qualifier and "*".


102411 25-Aug-2002 charnier

Replace various spelling with FALLTHROUGH which is lint()able


102369 24-Aug-2002 jdp

Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attempts
to fail needlessly if a reverse DNS lookup of the IP address didn't
come up with a hostname. As a comment in the code clearly stated,
the "damn hostname" was looked up only for the purpose of netgroup
matching. But if that lookup failed, the function bailed out
immediately even though in many cases netgroup matching would not
be used.

This change marks the hostname as unknown but continues. Where
netgroup matching is performed, an unknown hostname is handled
conservatively. I.e., for "+@netgroup" (accept) entries an unknown
hostname never matches, and for "-@netgroup" (reject) entries an
unknown hostname always matches.

In the lines affected (only), I also fixed a few bogus casts. There
are others, and in fact this entire file would be a good candidate
for a cleanup sweep.

Reviewed by: imp (wearing his flourescent yellow Security Team cap)
MFC after: 2 days


102237 21-Aug-2002 pirzyk

Fixed getaddrinfo to honor sortlist in /etc/resolv.conf

PR: bin/27939
Reviewed by: ru, sheldonh (about a year ago)
Obtained from: ume (via KAME, I think)
MFC after: 1 month


101943 15-Aug-2002 robert

- Fix a bug that wrote one char behind the end of the
supplied buffer in case the size of it was equal to
the number of characters the converted address consumed.
The bug occurred when converting an AF_INET address.
- Remove the SPRINTF macro and use sprintf instead.
- Do not do string formatting using sprintf(3) and a
temporary buffer which is copied when the supplied
buffer provides enough space. Instead, use snprintf(3)
and the real destination buffer, thus avoid the copy.

Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1)
PR: misc/41289


101939 15-Aug-2002 robert

Put each function argument on its own line to keep lines shorter
than 80 columns.


101880 14-Aug-2002 robert

-Add the restrict required by IEEE Std 1003.1-2001 in form
of our __restrict macro to the prototypes and function
definitions of inet_pton and inet_ntop.
- Use ANSI-C function argument lists.
- Adjust the prototypes in the manual page.


101576 09-Aug-2002 ru

mdoc(7) police: laundry.


101221 02-Aug-2002 mux

Remove an #include <syslog.h>. It's already included conditionally
above, as it should be.

Submitted by: Olivier Houchard <cognet@ci0.org>


100657 25-Jul-2002 ume

sysctl(NET_RT_IFLIST) up to several (currently 5) times.
This will make the behavior robuster if many addresses are added
after the size estimation of storage at the first sysctl.

Reviewed by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after: 1 week


100628 24-Jul-2002 ume

- ntohs() returns unsigned value.
- use strlcpy.
- snprintf can return negative value, so cope with it.
- tweak interface index on interface locals (ff01::/16).
- removed unused macros.
- removed a macro that uses only once (in a trivial context).
- explicitly say goodbye to ENI_xxx.
- constify struct afd.

Obtained from: KAME
MFC after: 1 week


100138 15-Jul-2002 ume

Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex()
and if_freenameindex().

Obtained from: KAME
MFC after: 2 weeks


99527 07-Jul-2002 robert

Fix syntax error which occurred when LIBC_SCCS was defined.


99252 02-Jul-2002 ume

Make NI_WITHSCOPEID a default (always on), to synchronize
with recent 2553bis.

Obtained from: KAME
MFC after: 3 weeks


98887 26-Jun-2002 imp

Remove two lines that were cvs merged that shouldn't have been. This
fixes the build.

Reported by: dillon.


98877 26-Jun-2002 imp

Remove two stray lines that snuck in the cvs merge


98872 26-Jun-2002 nectar

Initialize a pointer that was left uninitialized with the previous
commit.


98865 26-Jun-2002 imp

Include more robust checking of end of buffer that more completely
plugs the hole.


98860 26-Jun-2002 imp

Don't allow buffer overflow here either.


98858 26-Jun-2002 imp

Fix a minor last, minute issue that came in after I committed.

Noticed by: nectar


98855 26-Jun-2002 imp

Avoid remote buffer overflow on hostbuf[].

Submitted by: joost Pol <joost@pine.nl>


97924 06-Jun-2002 sheldonh

Correct FreeBSD release of first appearance in the HISTORY section
(5.0 -> 4.6).


97407 28-May-2002 alfred

Assume __STDC__, remove non-__STDC__ code.

Submitted by: keramida


96430 11-May-2002 mike

Document that <netinet/in.h> can also provide prototypes. Change
wording related to standards conformance.


95023 19-Apr-2002 suz

just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128)

Reviewed by: ume
MFC after: 1 week


94789 15-Apr-2002 ume

Add awareness of an IPv6.

MFC after: 1 week


94757 15-Apr-2002 nectar

Quoting log message for OpenBSD rev 1.7:
``Tack on MagniComp (BSD) license since this originally came from rdist.''

Obtained from: OpenBSD


94174 08-Apr-2002 ru

Fix style of ether_ntoa().


93956 06-Apr-2002 ru

Polish previous revision.


93929 06-Apr-2002 dillon

Fix ether_ntoa() to generate the %02x format people expect, instead of %x,
for the ethernet address.

MFC after: 1 day


93544 01-Apr-2002 ume

When _kevent() returns with errno = EINTR and timeout is not
exceeded, it should be falldown to next_ns.

MFC after: 1 week


92991 22-Mar-2002 obrien

Fix the style of the SCM ID's.
I believe have made all of libc .h's as consistent as possible.


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.


92319 15-Mar-2002 obrien

Remove trailing characters from #endif.
Actually this #endif is not needed, so remove leading characters also.


91725 06-Mar-2002 eric

Add a carriage return to each function declaration, and make use of ID tag
macros.

MFC after: 1 day


90868 18-Feb-2002 mike

o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm


90273 05-Feb-2002 alfred

balance parens.

Submitted by: mbr


90271 05-Feb-2002 alfred

Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code.
Remove ()P macro in a file where the mayority had ()P already removed.
Add them if the mayority use ()P macros.

Submitted by: mbr
Requested by: bde


90053 01-Feb-2002 roam

Return ENONAME if getaddrinfo() is called with AI_NUMERICHOST
and the hostname given is not numeric.

PR: 34390
Submitted by: Serge van den Boom <svdb@stack.nl>
Approved by: silence from -net
MFC after: 1 month


89362 14-Jan-2002 ru

yp(4) -> yp(8).

PR: docs/30797


88504 26-Dec-2001 ume

- Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
- Don't connect datagram socket if RES_INSECURE1.
- Needed to implement IPv6 anycast UDP DNS queries as documented in
<draft-ietf-ipngwg-dns-discovery-03.txt>.

Obtained from: KAME


87533 08-Dec-2001 ru

Start using .St macro for POSIX.1-2001.


87158 01-Dec-2001 mike

o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
_POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
__FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
<arpa/inet.h>.

Reviewed by: fenner
Partially submitted by: bde


87089 29-Nov-2001 cjc

Duh. Back out most of my previous commit. It was mostly covered in the
STANDARDS section of the page. Add one remark there about inet_pton(3)
only understanding decimal values (in contrast to inet_aton(3) and
friends who are happy with 0ac.020.25 for 172.16.0.25).

Caught by: ru
MFC after: 2 days


87077 29-Nov-2001 cjc

After the long explanaition of how the inet_* functions interpret
Internet addresses, point out that inet_pton(3) only understands
dotted quads with decimal values.

MFC after: 2 days


86250 11-Nov-2001 bde

Fixed namespace pollution related to `err' in libc in the same way as for
`warn'. Now a whole 2 members of the err() family don't cause pollution.

This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c
has had its own version of err() for a long time, but this somehow
didn't cause problems until the update to awk-3.1.0.


86214 09-Nov-2001 ru

- Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from: BSDCon/EU 2k+1 terminal room


86162 07-Nov-2001 fenner

Don't ignore unknown characters. The previous code treated a line like:

hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns

exactly the same as:

hosts: files dns

Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.


85342 23-Oct-2001 imp

Allow users to specify a command to use as remote command instead of
using rcmd directly. This has been in my tree for a long time, but we
may need to sync with OpenBSD before MFC.

Obtained from: openbsd
PR: 15830

MFC after: 2 months


85080 17-Oct-2001 jlemon

Use the new SIOCGIFINDEX ioctl to efficiently map a name to an index.
If the syscall fails, fall back on the old method as a compatability
measure.


84760 10-Oct-2001 ru

getnetbyaddr() should be serviced by the "networks" database.


84725 09-Oct-2001 mike

Don't mangle vendor ids to put them in __RCSID. Just ifdef all vendor
id cruft.

Submitted by: bde


84437 04-Oct-2001 mike

Include <string.h> to prototype strcpy(3). While I'm here, make use
of the new RCSID macros.

MFC after: 3 days


84372 02-Oct-2001 ume

- cope with sa_len < sizeof(struct sockaddr).
From: Patrik Lindergren <patrik@datacom.nu>
- delint (pointer cast issue). from netbsd-current

Obtained from: KAME
MFC after: 1 week


84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


82644 31-Aug-2001 ru

Add manpage for inet_net_ntop(3) and inet_net_pton(3).

Obtained from: NetBSD


82642 31-Aug-2001 ru

Use ``.Rv -std'' wherever possible.

Submitted by: yar


82530 30-Aug-2001 mike

o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures.
o Make bswapXX() functions use a different spelling of u_int16_t and
friends to reduce namespace pollution. The bswapXX() functions
don't actually exist, but we'll probably import these at some
point. Atleast one driver (if_de) depends on bswapXX() for big
endian cases.
o Deprecate byteorder(3) prototypes from <sys/types.h>, these are
now prototyped indirectly in <arpa/inet.h>.
o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these
are now typedef'd in <arpa/inet.h>.
o Change byteorder(3) prototypes to use standards compliant uint32_t
(spelled __uint32_t to reduce namespace pollution).
o Document new preferred headers and standards compliance.

Discussed with: bde
PR: 29946
Reviewed by: bmilekic


81975 20-Aug-2001 kris

Mark some functions as __printflike() and/or taking const char * arguments
instead of char *.

MFC after: 2 weeks


81833 17-Aug-2001 ru

mdoc(7) police: collapse multiple spaces.


81591 13-Aug-2001 ru

mdoc(7) police: s;BSD/OS;.Bsx; where appropriate.


81586 13-Aug-2001 ru

Removed duplicate VCS ID tags, as per style(9).


81530 11-Aug-2001 ume

Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in
_res.sort_list for backward compatibility. However, both sort_list's
are maintaind by just one index _res.nsort. So, when IPv6 address is
specified to sortlist, empty entry was created in _res.sort_list. It
broke sortlist facility of gethostbyname().
Discussed on users@jp.ipv6.org.


81462 10-Aug-2001 ru

mdoc(7) police: join split punctuation to macro calls.


81283 08-Aug-2001 ru

Urge the reader to start using getaddrinfo(3) and getnameinfo(3)
protocol-independant functions that don't use static memory area.

Suggested by: nik
Liked by: ume, brian


81251 07-Aug-2001 ru

mdoc(7) police:

Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.


80743 31-Jul-2001 mp

Only pull in the MD files if they exist. This allows for progressive
implementation and compilation when bringing up a new architecture.


79778 16-Jul-2001 kris

Oops, commit the version which actually works

Obtained from: NetBSD
MFC After: 1 week


79776 16-Jul-2001 kris

Avoid a compile-time format string warning

Obtained from: NetBSD
MFC After: 1 week


79754 15-Jul-2001 dd

Remove whitespace at EOL.


79531 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79486 09-Jul-2001 tobez

Document more resolver(3) routines: dn_skip() from resolv.h, and
ns_get16(), ns_get32(), ns_put16(), and ns_put32() from arpa/nameser.h.

Markup by: ru
OK'ed by: markm


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


79366 06-Jul-2001 ru

mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).


79195 04-Jul-2001 ru

mdoc(7) police: print some example text with literal font.


78647 23-Jun-2001 jlemon

Bring in fix from rev 1.32 that got lost during the conversion to kqueue.
This prevents an indefinte timeout in case the kevent call is interrupted
for some reason.

PR: 26665
MFC in: 2 weeks


78012 10-Jun-2001 ume

Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers. Need careful configuration
when enable it. (default config is not affected).
See manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.

Obtained from: KAME/NetBSD


77877 07-Jun-2001 ru

s/format/byte order/ (for clarity).


76925 21-May-2001 ume

Correct error message of an example.

Obtained from: KAME


76620 15-May-2001 ru

mdoc(7) police: sort xrefs.


76369 08-May-2001 alex

gethostbyname2() can't do AF_INET6 lookups over NIS.
getaddrinfo(3) must be used.

Submitted by: ume


76076 27-Apr-2001 archie

Add getaddrinfo(3) to the "SEE ALSO" list.


75671 18-Apr-2001 ru

mdoc(7) police: update referenced standard name.


75579 17-Apr-2001 kris

Correct a typo; prefered -> preferred.


74870 27-Mar-2001 ru

MAN[1-9] -> MAN.


74700 23-Mar-2001 ume

IPv4 address is not unsigned int. This change introduces in_addr_t.

PR: 9982
Adviced by: des
Reviewed by: -alpha and -net (no objection)
Obtained from: OpenBSD


74393 17-Mar-2001 ume

Nuke non-standard EAI_RESNULL.


74188 13-Mar-2001 dd

Document the rest of the possible return codes.

PR: 25188
Approved by: nik


74173 12-Mar-2001 ru

.St -p1003.1g -> .St -p1003.1g-2000.


73665 05-Mar-2001 obrien

Fix style that got corrupted.


73663 05-Mar-2001 obrien

Fix FreeBSD id style breakage from rev 1.17


73233 28-Feb-2001 ru

Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.


73227 28-Feb-2001 jlemon

Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use. This should fix the problem
with DNS.

Pointy hat to: me


73098 26-Feb-2001 ru

Use ``.St -p1003.1g''.


72693 19-Feb-2001 ume

Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Some
applications specify AI_ADDRCONFIG and fail to run under FreeBSD.
Latest mews is known. Now, getaddrinfo(3) behaves according to
AI_ADDRCONFIG.


72510 15-Feb-2001 ume

Correct 2nd argument of getnameinfo(3) to socklen_t.

Reviewed by: itojun


72314 10-Feb-2001 ru

mdoc(7) police: polishing.


72311 10-Feb-2001 nik

Improve language and code examples.

PR: docs/24961
Submmitted by: Tony Finch <dot@dotat.at>


72251 09-Feb-2001 nik

Describe the arguments to gethostbyaddr.

PR: docs/24225
Submitted by: Joakim Henriksson <jurduth@ludd.luth.se>
Patch from: ben


72126 07-Feb-2001 ru

mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged. With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.


72092 06-Feb-2001 asmodai

Fix typo: compatability -> compatibility.

Compatability is not an existing english word.

Add $FreeBSD$.


71929 02-Feb-2001 nectar

strcpy -> strlcpy paranoia

Submitted by: Mike Heffner <mheffner@vt.edu>
Reviewed by: freebsd-audit


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


71678 26-Jan-2001 ume

s/err1/errx/.
http://X68000.startshop.co.jp/~68user/cgi-bin/wwwboard.cgi?log=1673

Obtained from: KAME


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


70974 12-Jan-2001 ru

mdoc(7) police: Ft/Vt now accept punctuation-type arguments.


70959 12-Jan-2001 ru

man(7) -> mdoc(7).


70710 06-Jan-2001 alex

gethostbyname2() is able to lookup AF_INET6.

PR: 23823
Noticed by: Andrew Arensburger <arensb@ooblick.com>


70481 29-Dec-2000 ru

Prepare for mdoc(7)NG.


70015 14-Dec-2000 ru

mdoc(7) police: removed history info from the .Os FreeBSD call.


69857 11-Dec-2000 ru

mdoc(7) police: use canonical form of .Dd macro.


69575 04-Dec-2000 ume

- __ivaliduser_sa() was introduced for forthcoming IPv6 support to lpd
- iruserok_sa() and __ivaliduser_af() were re-organized to use
__ivaliduser_sa()
- __icheckhost() was re-written to use getaddrinfo() instead of
getipnodebyname()
- better handling of multiple destination addresses in rcmd()

These changes were basically taken from KAME and changed to fit our
rcmd.c.

Obtained from: KAME


69051 22-Nov-2000 ru

mdoc(7) police: Er macro usage cleanup.


68946 20-Nov-2000 ru

mdoc(7) police: Nm -> Fn where appropriate.


68945 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


67894 29-Oct-2000 sumikawa

Fix memory leak.

Obtained from: KAME


67800 28-Oct-2000 ume

defined HAVE_IFM_DATA for (free|net|open)bsd

Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
Obtained from: KAME Project


67709 27-Oct-2000 ume

Make RES_OPTIONS=inet6 work.
Basically PR22196, but slightly modified.

PR: bin/22196


66999 12-Oct-2000 jasone

Fix pthread cancellation point propagation.


66485 30-Sep-2000 nectar

Use issetugid instead of comparing get[ug]id and gete[ug]id.

Suggested by: Don Lewis <Don.Lewis@tsc.tdk.com>


66451 29-Sep-2000 nectar

Ignore HESIOD_CONFIG and HES_DOMAIN environmental variables for
set-user-ID and set-group-ID programs.

Suggested by: Danny Braniss <danny@cs.huji.ac.il>


66374 25-Sep-2000 itojun

off-by-1 error in string length validation
From: Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>


65772 12-Sep-2000 ps

Change from using poll(2) to kqueue/kevent when waiting for a DNS
response to return. This will stop processes waiting on DNS requests
from being woken up when a select collision occurs. This was tested
on mx1.FreeBSD.org (outgoing mail for the FreeBSD.org mailing
lists.)

Reviewed by: jlemon, peter


65702 10-Sep-2000 nectar

Set h_errno when an error is encountered.

PR: bin/21092
Submitted by: Alexander Kabaev <ak03@gte.com>


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


65453 04-Sep-2000 peter

Yank out the NOPOLL conditionals. libc_r no longer needs it, and this
library depends on other things that come *way* later than poll() now
(sigset size changes in particular)


64958 22-Aug-2000 jhb

The API change mentioned in the previous revision has been backed out, so
back out the corresponding documentation.

Noticed by: brian, ume


64493 10-Aug-2000 ume

Don't retry connecting via the same medium.
I changed to close to original code before merging IPv6 support.
It seems having delay before another try is useless. However, I'm
not sure that delay means. So, I leave it as-is.

PR: bin/20515


64469 09-Aug-2000 itojun

mention getipnodeby* and get{addr,name}info are not thread-safe. (sync with kame)
s/.Os KAME/.Os/
comment From: Greg Thompson


63704 21-Jul-2000 jasone

Use _close() instead of close() in addrconfig() to keep it from becoming a
potential cancellation point in libc_r.


63682 20-Jul-2000 ume

Copy canonname for *ahost, into static buffer.

Obtained from: KAME Project


63622 20-Jul-2000 brian

Alocate rcmd{,_af}()'s *ahost argument using malloc() (well
strdup()) rather than pointing it at something that's free()d
(via freeaddrinfo(res)) before the function returns.

I appreciate that this is an API change, but it's the only way
(AFAIK) of doing this without breaking existing code that uses
rcmd{,_af}().

Pointed out by: phkmalloc


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>


63474 18-Jul-2000 archie

Const'ify parameters to ethers(3) routines as appropriate.


62939 11-Jul-2000 peter

Try and fix the worst of some highly bogus malloc/free resource
management involving rcmd_af(), getaddrinfo(), freeaddrinfo(), etc.
We set *ahost to point to ai->canonname; and later free the ai-> stuff
and still leave the old pointers in *ahost to the freed data.
Perhaps the best way to deal with this is a static buffer or a static
strdup() that is freed on the next iteration or something. This gives
me headaches just thinking about this.

The new 'AJ' default for malloc() tripped this up.


62836 09-Jul-2000 itojun

reject empty scopeid. use strtoul() for checking all-numericness of
portname. explicitly reject empty numeric portname.
sync with kame. based on comments from itohy@netbsd.org


62625 05-Jul-2000 itojun

sync with more recent kame tree.
- correct scoped notation separator (s/@/%/)
- include example and more references


62615 05-Jul-2000 itojun

sync with latest kame.
- permit numeric scopeid, be more careful about buffer size

TODO: 2nd arg type should be socklen_t for RFC2553 conformance,
but due to include file dependency it is not a easy thing to do
(netdb.h does not have socklen_t)


62614 05-Jul-2000 itojun

sync with kame.
- better return code. from enami@netbsd
- do not use "class" as variable name. C++ guy had trouble with it.


62606 05-Jul-2000 itojun

add getifaddrs(3) from bsdi. this is a magic function which lets you grab
interface addresses in a portable manner, without headache of SIOCGIFCONF
or sysctl. it is in bsdi/openbsd/netbsd already.
from kame tree (actually, mandatory for latest kame tree).


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


61877 20-Jun-2000 ume

Don't call _getipnodebyname_multi(). It fixes the problem that
getaddrinfo() accidentally returns IPv4 mapped IPv6 address instead
of native IPv4 address.
Now, getaddinfo() is scoped address ready. You can put scoped
address within /etc/hosts.

Obtained from: KAME Project.


61824 19-Jun-2000 ume

Re-commit DNS IPv6 transport support with fixes for IPv4 only
kernel and compatibility issue.

Obtained from: KAME Project


61697 14-Jun-2000 ume

Backout my previous commit.
Cannot resolve any host on IPv4 only kernel.

Reported by: ache


61556 11-Jun-2000 ume

DNS IPv6 transport support.
It is nessesary for IPv6 only life.

Obtained from: KAME


61109 31-May-2000 hoek

Fix an mdoc-o, and english.


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


60465 12-May-2000 phantom

. fix .Dt macro argument
. spell inet6_rthdr_reverse correctly


60311 10-May-2000 sheldonh

Supply only one author name per instance of %A, as per mdoc.samples(7).

PR: 18465
Submitted by: Kazu TAKAMUNE <takamune@avrl.mei.co.jp>


60296 10-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


60078 06-May-2000 phantom

Use `Er' variable to define first column width in ERRORS section.


59460 21-Apr-2000 phantom

Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.


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


58637 26-Mar-2000 jlemon

Decrement the timeout being passed to poll() if poll was interrupted for
some reason. This will prevent an infinite loop if (say) a sigalarm is
being scheduled at a more frequent interval than the poll timeout.

PR: 2191, 8847, 10553


58490 23-Mar-2000 bde

Fixed missing #include of <sys/types.h> in synopsis.
Fixed spelling error in prototype for inet_option_space().
Fixed syntax error in prototype for inet6_option_alloc().


58488 23-Mar-2000 bde

Fixed missing #include of <sys/types.h> in synopsis.


58154 16-Mar-2000 bsd

Back out that last commit, it may be insecure (pointed out by Warner
Losh).


58152 16-Mar-2000 bsd

Slight adjustment to __ivaliduser() - don't ignore the last line in
the .rhosts file just because there is no ending linefeed.


58096 15-Mar-2000 jlemon

Fix uninitialized variable.

Submitted by: tanimura


57940 12-Mar-2000 shin

Merge from NetBSD. Addition of inet_ntop() and inet_pton() description.

Specified by: Robert Muir <rmuir@looksharp.net>

Obtained from: NetBSD


57939 12-Mar-2000 shin

Cosmetic fix. Re-order MLINKS for if_indextoname.3 and inet.3 as alphabetical
order.


57937 12-Mar-2000 shin

Correct MLINKS contents for rcmd.3, because it is obsolete due to
recent changes to rcmd.3.

links to iruserok_af.3, ruserok_af.3 are removed.
link to iruserok_sa.3 is added.


57936 12-Mar-2000 shin

Import from KAME. Advanced API related function descriptions.

Obtained from: KAME project


57878 09-Mar-2000 jlemon

Add in IPV4 NIS support.

PR: 17290 (but not the same patch)
Approved by: jkh


57866 09-Mar-2000 shin

More grammer, wording, and mdoc fixes.

Submitted by: bde
Reviewed by: sheldonh


57719 03-Mar-2000 shin

CMSG_XXX macros alignment fixes to follow RFC2292.

Approved by: jkh

Submitted by: Partly from tech@openbsd
Reviewed by: itojun


57699 02-Mar-2000 shin

-Reflect function name change.
-Added more description.
-Many grammer fix.
-Fix hard sentence break.
-Many other man style fix.

Thanks for bde finding out the problem.
Thanks for sheldon for the patient and thorough review.
:-)

Submitted by: bde
Reviewed by: sheldonh


57686 02-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


57340 19-Feb-2000 shin

Change IPv6 scoped addr format again based on recent standard discussion.
Sorry for the flapping, but no change will be done for 4.0 anymore.
Official standard will be published around April or later.
If different format would be adopted at that time, then support for
the new format will be added to the succeeding FreeBSD 4.x.

Approved by: jkh


57252 16-Feb-2000 fenner

Fix coredump in gethostbyaddr() when the returned answer is too large to
fit in the static buffer. This fix causes it to look like there is no
data available, which is also wrong but is better than dumping core.

PR: bin/10344
Reviewed by: billf
Approved by: jkh


57123 10-Feb-2000 shin

Add more dual stack consideration.

-Should not error return when rresvport_af() failed for one of dest
addrs resolved by getaddrinfo().
Should retry until all dest addr fail.

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


57069 09-Feb-2000 shin

IPv6 scoped addr format is changed as recent KAME change.

KAME scoped addr format is changed recently.
before: addr@scope
now: scope%addr

Because the end of IPv6 numeric addr is tend to be truncated in
`netstat -rn ` output, so placing scope part at starting of addr
will be convenient.

Approved by: jkh

Obtained from: KAME project


56939 01-Feb-2000 shin

sync iruserok() extension API with other BSDs

Some of rcmd related function is need to be updated to
support IPv6. Some of them are already updated as standard
document. But there is also several de-facto functions and
they are not listed in standard documents.
They are,

iruserok() (used by rlogind, rshd)
ruserok() (used by kerberos, etc)

KAME package updated those functions in original way.

iruserok_af()
ruserok_af()

But recently there was discussion on IETF IPng mailing
list about how to sync those API, and it is decided,

-Those function is not standard and not documented.
-But let BSDs sync their API as de-facto.

And after some discussion, it is announced that

-add update to iruserok() as iruserok_sa()
-no ruserok() API change(it is only updated internaly)

So I sync those API before 4.0 is released.
The changes are,
-prototype changes
-ruserok() internal update (use iruserok_sa() inside)
-removal of ruserok_af()
-change iruserok_af() as static functioin, and also prefix the name with __.
-add iruserok_sa() (Just call __iruserok_af() inside)
-adding flag AI_ALL to getipnodebyaddr() called from __icheckhost().
This is necessary to support IPv4 communication via AF_INET6 socket
could be correctly authenticated via iruserok_sa()
-irusreok_af() call is replaced to iruserok_sa() call
in rlogind, and rshd.

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


56671 27-Jan-2000 shin

Allow reverse lookup for loopback addr.
This is merge from recent KAME fix to be more compliant with RFC2553.

Obtained from: KAME project


56636 26-Jan-2000 shin

Removed 3rd arg from bindresvport_sa() call, because the 3rd arg have been
already removed.

Specified by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>


56629 26-Jan-2000 shin

bindresvport related changes
-changed bindresvport2 to bindresvport_sa
-merged the man into bindresvport.3

All discussion between Jean-Luc Richier <Jean-Luc.Richier@imag.fr>,
Theo de Raadt <deraadt@cvs.openbsd.org>, itojun, is reflected to
this code. (Actually Theo de Raadt write the code simultaneously as the
discussion change.)


56627 26-Jan-2000 shin

Fix getaddrinfo() behaviour to be more compliant with RFC2553. Patches are
obtained from itojun.
-don't filter address families which are not supported by system at
FQDN resolving.
-don't do reverse lookup

I think I checked all lib and tools which use getaddrinfo() if
this change affect them.

Obtained from: KAME project


56590 25-Jan-2000 shin

several tcp apps IPv6 update
-inetd
-rshd
-rlogind
-telnetd
-rsh
-rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


55918 13-Jan-2000 shin

libc rcmd update for IPv6.
A new function bindresvport2(), AF independent version of bindresvport()
is also added.

Reviewed by: sumikawa
Obtained from: KAME project


55877 13-Jan-2000 shin

added IPv6 unspecified addr check for getipnodebyaddr.


55876 13-Jan-2000 shin

added IPv4 mapped IPv6 addr consideration for getaddrinfo() reverse lookup case


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().


55474 05-Jan-2000 bde

Fixed missing include in synopsis.

Use long lines instead of lines split with backslash-newline in synopsis.
My synopsis checker doesn't understand backslash-newline.


55473 05-Jan-2000 bde

Fixed missing include in synopsis.


55174 28-Dec-1999 rwatson

Suppress vast quantities of unneeded warnings spewed by libc's gethostbydns
on encountering a real-world SIG record during a lookup of another type.

PR: bin/7352
Reviewed by: peter, eivind


55167 28-Dec-1999 shin

Small bug fix and improvements
(1)added error check of if_nameindex() return value at getaddrinfo().
(2)print out more detailed information when getaddrinfo() error value
is EAI_SYSTEM.(in this case system error num is kept in errno)

(1) is Discovered by: jinmei@kame.net in KAME environment.


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


55135 27-Dec-1999 peter

Make this compile with -Wall -Werror


55038 23-Dec-1999 bde

Fixed missing includes in synopsis.


54696 16-Dec-1999 shin

KAME 4th patch
IPv6 specific library functions addition.
(getnameinfo(), getaddrinfo(), and IPv6 transport support is not yet)

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


52865 04-Nov-1999 ache

Add unsigned char cast to isalpha


52863 04-Nov-1999 ache

Add unsigned char cast to is[x]digit


52859 04-Nov-1999 ache

unsigned char cast to ctype macros


52858 04-Nov-1999 ache

Add unsigned char cast to ctype macros arg


52820 03-Nov-1999 green

Fix a really lame buglet which broke with IPs of 34
(ERANGE...)


52708 31-Oct-1999 green

Allow whitespace termination. Internal use of /etc/resolv.conf relies
on this, and who knows what else would, too...


52707 31-Oct-1999 green

This is the new inet_addr/inet_aton with proper error checking. This
should close all outstanding PRs on incorrect inet_aton behavior, and
since it has a decent parsing routine, doesn't allow some hysterically
working behavior.

PR: 13628
Submitted by: Adrian Chadd <adrian@FreeBSD.org>


51764 28-Sep-1999 peter

Back out my backout, it was already posix compliant. Any new fields are
required to be "announced" by a new bit in sa_flags to indicate the
program is aware of and has taken care of them. eg: SA_SIGINFO means
the program has used the sa_siginfo field (versus sa_handler).


51762 28-Sep-1999 peter

Fix previous commit. The standards specifically say: "The structure
sigaction, used to describe an action to be taken, is defined in the
header <signal.h> to include at least the following members:"
^^^^^^^^
A sigaction defined on stack with essentially random contents may have
just about anything underneath fields that the program doesn't know about.
It is not safe to delete the bzero.


51759 28-Sep-1999 marcel

Explicitly use sigemptyset to clear a sigset_t. Explicit
initialization of sa_flags allows us to lose the bzero.


51419 19-Sep-1999 phantom

Fix typo

PR: docs/13814
Submitted by: Alex Vasylenko <lxv@mix.nest.org>


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48794 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


47819 07-Jun-1999 dt

Ensure that host_addr (which is returned in struct hostent::h_addr_list[0])
is aligned so that pointer to it can be safely casted to struct in_addr *.


47742 04-Jun-1999 peter

Change an internal variable from "class" to "ns_class" for C++'s benefit.
Apparently BIND-8.2.1 uses ns_class.

Submitted by: John Plevyak <jplevyak@inktomi.com>


44387 02-Mar-1999 ghelmer

Mention that getservbyport requires its port parameter to be in
network byte order.

PR: docs/9376


43920 12-Feb-1999 alex

Removed occurrences of consecutive repeated words (such as "the the").


43171 25-Jan-1999 gallatin

gethostbyname2() was broken for lookups via NIS on FreeBSD/alpha
due to _gethostbynis() setting h.h_length to sizeof(u_long), which
works out to 8 on alphas. And 8!= NS_INADDRSZ.


39979 05-Oct-1998 dfr

64bit portability fixes.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>


39194 14-Sep-1998 imp

o use strncpy safely
o Only allow options and domain name to be set when we aren't running
setuid.

Obtained from: OpenBSD


38736 02-Sep-1998 jdp

Implement the weak aliases for private entry points in the inet_*
and res_* modules in a way that works for ELF. I moved the aliases
out of res_stubs.c and into the individual modules where the entry
points are defined. Weak aliases don't work in ELF unless that is
the case. (Actually, I'm surprised it worked for a.out.)

This should fix the undefined "inet_addr" and related symbols in
various applications that fail to include <arpa/inet.h> or
<resolv.h> as they are supposed to do.


38060 03-Aug-1998 bde

Fixed bitrot in prototypes in synopsis.


37301 30-Jun-1998 bde

Fixed printf format errors.


36967 14-Jun-1998 peter

Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.


36891 11-Jun-1998 peter

Update the resolver parts to bind-8.1.2 level. I have not touched the
getXXXXbyYYYY() interfaces yet.

Obtained from: diff relative to bind-8.1.2 sources


36692 06-Jun-1998 jkoshy

Spelling corrections.

PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>


35624 02-May-1998 peter

Resolve some unexpected differences when comparing with the 2.2 version.
One bug was relatively harmless (select's timeout had an uninitialized
tv_usec), the other I'm not so sure.. (neglected to catch select returns
less than zero). Both of these were irrelevant on kernels with poll().


35623 02-May-1998 peter

Update libc dns code to 4.9.7-T1B level. This involved chopping out large
chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver
code. (There are no interface changes though)
The other parts are better bounds checking related.


34817 23-Mar-1998 bde

(Ab)use .Vt instead of .Fd for a variable declaration.


34669 19-Mar-1998 charnier

.Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq


33668 20-Feb-1998 jb

Change MACHINE references to MACHINE_ARCH.


33667 20-Feb-1998 jb

Add #include <string.h> to get prototypes.


32647 20-Jan-1998 bde

Fixed #includes in the synopsis and in an example. <sys/socket.h>
isn't a prerequisite, since it isn't required for the prototypes
and isn't always needed to call the functions (the address family
might be a variable).


32299 07-Jan-1998 imp

handle long usernames more carefully
Reviewed by: guido
Obtained from: OpenBSD (Theo de Raadt)


31984 25-Dec-1997 alex

Removed unnecessary initialization of hp in gethostbyaddr_r.


30624 21-Oct-1997 bde

Sorted lists.


30447 15-Oct-1997 bde

Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.


29488 16-Sep-1997 peter

Some adjustments for the resolver use of poll(). For some reason I thought
an unimplemented syscall returned ENOSYS, rather than EINVAL. I have run
statically linked code with this wrapper and it does appear to work fine
on 2.2-stable which doesn't have poll(). ktrace shows the poll syscall fail
once and the fallback to select() working.


29380 14-Sep-1997 peter

Call poll(2) from within the resolver but adapt to older kernels without it
if necessary. This removes the need to malloc large fd_set's for selecting
on high fd's (larger than FD_SETSIZE at libc compile time).

The syscall adaptive stuff only happens on the very first call. SIGSYS
is masked, and if the call to poll fails with ENOSYS, then we use select
for the life of the program. If poll does not fail with ENOSYS, then we
always use poll and skip the once-off signal masking gunk.

This may be overkill, but it saved my neck a few times while working on
multiple different sets of kernel sources, some with poll, some without.


28982 01-Sep-1997 brian

Add "options no_tld_query" to resolv.conf.
Mention the capability in resolver(5).
Mention that RES_OPTIONS can be used in resolver(5).
Discussed with: -hackers


27369 13-Jul-1997 peter

kill the undead


27181 03-Jul-1997 bde

This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.


27016 28-Jun-1997 peter

replace the OpenBSD fd_set sizing code with something more efficient.
Only call malloc() if the fd is too big for the compiled in fd_set size,
and don't use calloc either. This should reduce the impact of conflicts
with private malloc implementations etc. When using the fd_set on the
stack, only zero what is needed rather than all 1024 bits like FD_ZERO did.


26983 27-Jun-1997 peter

Dynamically size fd_set in select rather than fail if too many files
are open.
Obtained from: OpenBSD; by deraadt and dm


26976 27-Jun-1997 peter

compensate for res_send <-> __res_send changes


26974 27-Jun-1997 peter

Merge in bind-4.9.6 resolver changes. Note that they resolve the
overflow problem differently.


26721 18-Jun-1997 charnier

Typo.


26616 13-Jun-1997 ache

Add MAXHOSTNAMELEN check
Obtained from: OpenBSD


25401 03-May-1997 jb

Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.


24877 13-Apr-1997 bde

Fixed #include and/or prototype bugs in synopsis.


24196 24-Mar-1997 imp

If we're running setuid/setguid then don't open the host alias file to
prevent information leakage.

Closes PR 2578

Submitted by: Julian Assange


24047 19-Mar-1997 bde

Fixed missing #include of <sys/types.h> and wrong arg types in synopsis.

Reviewed by: wollman


24006 19-Mar-1997 bde

Fixed missing function types in synopsis.


23767 12-Mar-1997 peter

Fix problem with FD_SET* overflow reporting.. Perror() didn't have enough
args, and errno hasn't actually been set so it probably doesn't make sense
to report it via strerror().

Pointed out by: bde


23766 12-Mar-1997 peter

_res_close() -> res_close()

Pointed out by: bde


23617 10-Mar-1997 guido

Check for overflow of FD_SET


23180 28-Feb-1997 mpp

getnetbyaddr now takes an unsigned long as its first argument.


23128 26-Feb-1997 imp

Buffer overflow from DNS name information which could cause root access
when called from lpd.

Reviewed by: jkh, pst
Submitted by: Oliver Friedrichs <oliver@secnet.com>


22993 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


22469 09-Feb-1997 imp

Fix PR2579: potential security hole in rcmd.c

Submitted by: Julian Assange


22140 30-Jan-1997 mpp

Update to reflect current include files.


21907 20-Jan-1997 wosch

Sort cross references.


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


21433 08-Jan-1997 ache

Fix fake failures on the short names which looks like hexadecimal numbers
Submitted by: paul@vix.com


21343 05-Jan-1997 ache

Disable isxdigit block until proper solution will be found
isxdigit(name[0]) gives false failures on short names which looks
like hexadecimal digits, f.e. "fade", "babe", "d133", etc.


21168 01-Jan-1997 jkh

Remove bogus weak reference.


21058 30-Dec-1996 peter

Tempt fate! 'cvs add' a file remotely which also exists in the Attic on
RELENG_2_2!

This is part#2 of the previous commit to src/lib/libc/net to contain the
potential damage.

This provides stubs so that binaries linked in 2.2 will run on 3.0


21057 30-Dec-1996 peter

Here goes.. Bring the 4.9.5-P1 resolver into -current. This has the
DNSSEC stuff, among other things. There are also some renamed functions,
I've left out the res_stubs.c from this commit in case cvs bombs out..


20953 27-Dec-1996 wpaul

Small yet significant tweaks/cleanups:

- getservent:
o put _yp_check() proto under #ifdef YP where it belongs
o local YP buffers should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying

- gethostbynis:
o local YP buffer should be YPMAXRECORD + 2 bytes long

- getnetbynis:
o local YP buffer should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying

- ether_addr:
o local YP buffers should be YPMAXRECORD + 2 bytes long and should
be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes,
but it happens that BUFSIZ == YPMAXRECORD.

- gethostbydns:
o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly)

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.


20900 24-Dec-1996 wpaul

Another one-liner: remember to NUL terminate local copy of NIS host
lookup results. Without this, doing multiple host/addr lookups in a
single process yeilds strange results (the buffer is static, and
garbage may be left behind from previous lookups).

I just noticed this in 2.2-BETA. Unless somebody threatens to chop my
hands off with an axe, I'm going to move this to the 2.2-RELENG branch
shortly.


20892 24-Dec-1996 wpaul

Make the __dns_getanswer() wrapper work right. For the newer versions
of BIND, we need to tweak some things to that gethostanswer() knows
whether or not we're dealing with an IPv4 or IPv6 address. (This'll
teach me to use a 2.1.0 system for NIS development -- but it's so nice
and stable I just can't being myself to upgrade it. :)


20888 23-Dec-1996 wosch

comma typos


20817 22-Dec-1996 wpaul

Add __dns_getanswer() hook to allow access to the gethostanswer()
functions from outside libc. (Needed for async DNS resolver in ypserv.)


20486 14-Dec-1996 mpp

Correct some xrefs/mlinks.


20398 13-Dec-1996 joerg

Fix the fix.

Pointed out by: wollman, bde


20375 12-Dec-1996 joerg

Fix an embarassing and rather obscure incarnation of an uninitialized
local variable use.

Found by: actually using ascii2addr() :-/


20288 10-Dec-1996 wollman

Get struct ether_addr directly from <net/ethernet.h> rather than pulling
in lots of unrelated junk from <net/if.h> and <net/if_ether.h>. These
functions still aren't prototyped anywhere (but should be in
<net/ethernet.h>---got that, Bill?).


20168 06-Dec-1996 jkh

I asked Bill Paul why _getnetbynis() was only being called with 2 parameters,
and he said:

The 3rd agrument is new; looks like it was part of the upgrade to
a new BIND with some IPv6 support. The third argument here should be
AF_INET. In order for it to be anything else, I'd have to add new
NIS functions to support IPv6 lookups. I don't even know what those
look like yet.

So there ya go, add AF_INET as the 3rd argument to the call.

Submitted-by: wpaul


20164 05-Dec-1996 jkh

Remove more instances of passing arrays by address when they should
have simply been passed as arrays. In some cases, casts had even
been added to remove the warnings generated by such misuse! Aieee!


20163 05-Dec-1996 jkh

Eliminate 3 more examples of gratutiously passing arrays by address.

Everyone please call ParaSoft today and say "I will buy 57 copies of
Insure++ tomorrow, but first I want a FreeBSD version." :-)


19302 01-Nov-1996 peter

Doc updates and cleanups made with the bind-4.9.4 update some time ago.
I thought I had committed these, but it seems not.


19301 01-Nov-1996 peter

Add an "officially undocumented" tweak for squid so that it can see the
TTL of DNS records that it looks up for it's resolver cache.

Obtained from: Endre Balint Nagy <bne@CareNet.hu>, via squid-1.1.x source.


18966 16-Oct-1996 jkh

Bring back ns_* routines; we need them for ifconfig and route.


18824 08-Oct-1996 jdp

Fix an error in the description of "h_errno". Add "const" to a few
declarations to make them agree with the actual prototypes in <netdb.h>.


18608 01-Oct-1996 pst

Skip results that have unexpected lengths


17957 30-Aug-1996 peter

Sigh, back out the last bright idea I had here about compiling the res_*
routines from contrib/bind directly. There were too many problems,
including having to add -DUSE_OPTIONS_H to the entire libc source in
order for the contrib code to pick up it's options, and so on.

Instead, I've merged the changes, libc is now self contained again.


17955 30-Aug-1996 peter

back out last two changes, this caused the mandoc pages to be replaced by
man pages. I'll fold in the real changes in a seperate commit.


17922 30-Aug-1996 peter

oops, brain-lapse caused undefined symbol


17917 29-Aug-1996 peter

The last commit failed part-way through, re-add the generated
resolver man pages.


17916 29-Aug-1996 peter

Revert change to build the reolver man pages on the fly, install the
machine-generated versions


17903 29-Aug-1996 peter

Merge in bind-4.9.4-P1 resolver...


17763 21-Aug-1996 mpp

Update some more man pages to use the .Fx macro.


17706 20-Aug-1996 julian

Submitted by: John Birrell <cimaxp1!jb@werple.net.au>

Here are the diffs for libc_r to get it one step closer to P1003.1c
These make most of the thread/mutex/condvar structures opaque to the
user. There are three functions which have been renamed with _np
suffixes because they are extensions to P1003.1c (I did them for JAVA,
which needs to suspend/resume threads and also start threads suspended).

I've created a new header (pthread_np.h) for the non-POSIX stuff.

The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented
doesn't work. I think its best to delete it. I don't think libc_r needs
tags anyway, 'cause most of the source is in libc which does have tags.

also:

Here's the first batch of man pages for the thread functions.
The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was
inherited from /usr/src/lib/libc/Makefile that should only be done with
libc.

also:

I should have sent this diff with the pthread(3) man page.
It allows people to type

make -DWANT_LIBC_R world

to get libc_r built with the rest of the world. I put this in the
pthread(3) man page. The default is still not to build libc_r.


also:
The diff attached adds a pthread(3) man page to /usr/src/share/man/man3.
The idea is that without libc_r installed, this man page will give people
enough info to know that they have to build libc_r.


17543 12-Aug-1996 peter

clear sockaddr_in's on stack before use
set sin_len
close one ftp port bounce attack
have rresvport() use bindresvport() rather than duplicate the code,
rresvport() is a superset of bindresvport().

Obtained from: OpenBSD / Jason Downs / Theo de Raadt, minor tweaks by me.


17141 12-Jul-1996 jkh

General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>


16457 17-Jun-1996 wollman

Add RCS Id and fix date.


16456 17-Jun-1996 wollman

Cross-reference addr2ascii(3).


16454 17-Jun-1996 wollman

Correct date and add $Id$ to reflect previous modification.


16453 17-Jun-1996 wollman

Cross-reference addr2ascii(3) and inlcude a note about how those
functions are preferred but are not widely available as yet.


16353 13-Jun-1996 wollman

It would help if I actually added the source code for these routines.


16352 13-Jun-1996 wollman

Add an independent implementation of addr2ascii(3) and ascii2addr(3)
following the API of the INRIA IPv6 implementation.


16050 01-Jun-1996 wpaul

Improve NIS performace of getservbyname() and getservbyport(). Both these
functions are implimented as wrappers around getservent(), which means it's
up to getservent() to do all the work. The NIS support in getservent()
only allows it to scan through the services.byname map one entry at a
time until it finds the requested service name/port. This can be painfully
slow due to the overhead involved (lots and lots of successive RPCs).

To fix this, we allow getservbyname() and getservbyport() to signal
getservent() that if NIS is turned on (there's a '+' in /etc/services),
the usual yp_first()/yp_next() linear search should be abandoned and
yp_match() used instead. This causes getservent() to immediately
locate the requested entry instead of wasting time groping through the
whole map.

The downside is that this trick is accomplished by exporting a couple of
pointers from getservent.c which getservbyname.c and getservbyport.c can
preset in order to tell getservent() what to do. If all three functions
were in the same source module, then the extra cruft could be delcared
static to avoid poluting the global symbol space. Maybe they should be
combined anyway. For now I've settled on prepending lots of underscores.


16034 31-May-1996 peter

Use the setsockopt for IP_PORTRANGE to cause rresvport() to allocate a
privileged port within a single bind(), rather than looping through
attempts to bind over and over again over progressively lower ports.

This should speed up rlogin/rsh etc, and will probably cure some of the
strange rlogin hangs that have been reported in the past where rresvport()
managed to bind() to a port address that it shouldn't have.


15136 08-Apr-1996 mpp

Do not install the now unsupported netns and netiso
related man pages. Comment out cross references to those man
pages from other man pages.


15135 08-Apr-1996 mpp

Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.


14775 23-Mar-1996 wpaul

Fix other half of problem reported in PR #1079: _getnetbynisaddr() is
broken. The translation from network number to ASCII string was not
working correctly (you would sometimes get things like 0.244.0.0 instead
of 244.0.0).

Also copied results of yp_match() to a static buffer for consistency
with gethostbynis.c.

Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is
truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks
lookups) leaves the traling .0's in place. This means that the NIS
and local file lookups will match different things when looking up the
same network number. I'm not sure which is the correct behavior. (I
think the DNS lookup code tries all combinations -- should the NIS
and local host lookup routines do that too?)


14639 16-Mar-1996 wpaul

gethostbynis.c:

- Fix problem described in PR #1079: _gethostbynisaddr() doesn't
work. Make it accept the same arguments as all the other
gethostby*addr() functions and properly convert the supplied IP
address into a text string so that yp_match() can find it in the
hosts.byaddr map.

- Also fix potential memory leak: copy the results of yp_match() to
a static buffer and free the result (yp_match() returns dynamically
allocated memory).

ether_addr.c:

- Since I was in the neighborhood, fix ether_ntohost() and
ether_hostton() so that they don't bogusly for a free(result)
when yp_match() fails.


14131 17-Feb-1996 mpp

Fix inet_network to not dump core if passed in an address
with more than 4 octets (e.g. 1.2.3.4.5).

Submitted by: Amy Baron <amee@beer.org> via NetBSD-bugs


14101 15-Feb-1996 mpp

Fixed a bunch of man page cross references that were
in the main text of various man pages.

Thanks to Warner Losh for adding an option to manck to allow
it to scan the entire man page looking for bogus xrefs, instead
of just checking the SEE ALSO section.


14092 13-Feb-1996 wollman

XNS sort-of-support is no more.


14038 11-Feb-1996 mpp

Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.


13987 09-Feb-1996 mpp

Added some missing MLINKS for section 3 man pages.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.

This shuts up a lot of the output from "manck" for section 3.


13940 06-Feb-1996 wollman

Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree. NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).


13750 30-Jan-1996 mpp

Fix even more spelling errors in some more man pages.


13717 29-Jan-1996 mpp

Getpwent() and getservent() can wind up calling free() with
an invalid pointer if a call to yp_first() fails. Closes PR # 964,
and possibly # 952.


13408 13-Jan-1996 peter

The last of the bind-4.9.3-REL resolver merges.


13308 07-Jan-1996 peter

Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYY
parts are not quite so simple..


13305 07-Jan-1996 peter

This commit was generated by cvs2svn to compensate for changes in r13304,
which included commits to RCS files with non-trunk default branches.


13123 30-Dec-1995 peter

This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.


12082 04-Nov-1995 wpaul

Add NIS support to getservent(3) functions (getservbyport() and getservbyname()
both call getservent() to do most of the work, so we only need to modify
this file to take care of everybody).

Note that there is only one NIS services map (services.byname) even
though there are getservbyname() and getservbyport() library functions.


11661 22-Oct-1995 phk

As above.


10156 21-Aug-1995 peter

Remove the CFLAGS+=-I${CURDIR}/net that I previously added.
Since Bruce changed the #include <res_config.h> to #include "res_config.h"
this is no longer needed, and only makes the 'make' more verbose for
no real reason.


10151 21-Aug-1995 bde

Define DEBUG as 1 instead of as nothing so that it doesn't conflict with
-DDEBUG in libresolv/Makefile.


10150 21-Aug-1995 bde

Fix bogus include paths, some of which stopped libresolv from compiling.


10133 20-Aug-1995 peter

Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)
Note that this was done by selective patching from diffs, to not conflict
with the 4.4bsd base code.. This was *not* a trivial task.. I have been
testing this code (apart from cosmetic changes) in my libc for a while now.

Obtained from: Paul Vixie <paul@vix.com>


10059 14-Aug-1995 wpaul

Submitted by: Bill Fenner <fenner@parc.xerox.com>

Fix for PR #510. The original problem was that __ivaliduser() was
failing to grant access to a machine listed in a +@netgroup specified
in /etc/hosts.equiv, even though the host being checked was most
certainly in the +@netgroup.

The /etc/hosts.equiv file in question looked like this:

localhost
+@netgroup

The reason for the failure was had to do with gethostbyaddr(). Inside
the __ivaliduser() routine, we need to do a gethostbyaddr() in order
to get back the actual name of the host we're trying to validate since
we're only passed its IP address. The hostname returned by gethostbyaddr()
is later passed as an argument to innetgr(). The problem is that
__icheckhost() later does a gethostbyname() of its own, which clobbers
the buffer returned by gethostbyaddr().

The fix is just to copy the hostname into a private buffer and use
_that_ as the 'host' argument that gets passed to innetgr().

And here I was crawling all over the innetgr() code thinking the
problem was there. *sigh*


9978 07-Aug-1995 wpaul

Just when you thought it was safe...

- getnetgrent.c: address some NIS compatibility problems. We really need
to use the netgroup.byuser and netgroup.byhost maps to speed up innetgr()
when using NIS. Also, change the NIS interaction in the following way:

If /etc/netgroup does not exist or is empty (or contains only the
NIS '+' token), we now use NIS exclusively. This lets us use the
'reverse netgroup' maps and is more or less the behavior of other
platforms.

If /etc/netgroup exists and contains local netgroup data (but no '+').
we use only lthe local stuff and ignore NIS.

If /etc/netgroup exists and contains both local data and the '+',
we use the local data nd the netgroup map as a single combined
database (which, unfortunately, can be slow when the netgroup
database is large). This is what we have been doing up until now.

Head off a potential NULL pointer dereference in the old innetgr()
matching code.

Also fix the way the NIS netgroup map is incorporated into things:
adding the '+' is supposed to make it seem as though the netgroup
database is 'inserted' wherever the '+' is placed. We didn't quite
do it that way before.

(The NetBSD people apparently use a real, honest-to-gosh, netgroup.db
database that works just like the password database. This is
actually a neat idea since netgroups is the sort of thing that
can really benefit from having multi-key search capability,
particularly since reverse lookups require more than a trivial
amount of processing. Should we do something like this too?)

- netgroup.5: document all this stuff.

- rcmd.c: some sleuthing with some test programs linked with my own
version of innetgr() has revealed that SunOS always passes the NIS
domain name to innetgr() in the 'domain' argument. We might as well
do the same (if YP is defined).

- ether_addr.c: also fix the NIS interaction so that placing the
'+' token in the /etc/ethers file makes it seem like the NIS
ethers data is 'inserted' at that point. (Chances are nobody will
notice the effect of this change, which is just te way I like it. :)


9552 16-Jul-1995 peter

Slight adjustment to previous fix for __ivaliduser(). It was checking for
the comment before checking for long lines, so there was a possibility
that the wrap-around might be used as an exploitable hostname.
Reviewed by:
Submitted by:
Obtained from:


9539 16-Jul-1995 joerg

Make ruserok() accept the #-starting comment lines we used to have
in our default /etc/hosts.equiv.

Closes PR #conf/620: Default /etc/hosts.equiv...


9459 09-Jul-1995 joerg

Fix the prototypes for getservby{name,port}().

Closes PR #docs/568: minor manpage bug

Submitted by: Michael Smith (email address no longer valid)


8870 30-May-1995 rgrimes

Remove trailing whitespace.


7786 12-Apr-1995 wpaul

Add an ethers(3) man page.


7576 02-Apr-1995 wpaul

Add ether_addr functions to libc. This seems to be the logical place
to put them. A man page is in the works.


7325 24-Mar-1995 ache

Sicnce this code shares the same fragment as gethostnamaddr:
Change strtok() to strsep(), cause memory corruption for all
programs which use strtok() too in the same time.
Fix potential NULL reference, depends of /etc/hosts.conf format
Fix the bug when service name fetched always from beginning of the line,
not from parsed token.


7324 24-Mar-1995 ache

Change strtok() to strsep(), cause memory corruption for all
programs which use strtok() too in the same time.
Fix potential NULL reference, depends of /etc/hosts.conf format
Fix the bug when service name fetched always from beginning of the line,
not from parsed token.


7183 20-Mar-1995 wpaul

At last! Modified __ivaliduser() to do the same kind of user/host validation
that everyone else does: you can now use +host/-host, +user,-user and
+@netgroup/-@netgroup in /etc/hosts.equiv, /.rhosts, /etc/hosts.lpd and
~/.rhosts. Previously, __ivaliduser would only do host/user matches,
which was lame. This affects all the r-commands, lpd, and any other
program/service that uses ruserok().

An example of the usefullness of this feature would be a hosts.equiv
file that looks like this:

+@equiv-hosts

Since the netgroup database can now be accessed via NIS, this lets you
set up client machines once and then never have to worry about them
again: all hosts.equiv changes can now be done through NIS. Once I
finish with getpwent.c, we'll be able to do similar wacky things
with login authentication too. (Our password field substitution
will finally be on par with everyone else's, and I'll finally be
able to fully integrate my FreeBSD machine into my network without
having to worry about the grad students sneaking into it when I'm
not looking. :)

Danger Will Robinson! I tested this thing every which way I could, but
Murphy's Law applies! If anybody spots a potential security problem with
the way my matching algorithm works, tell me immediately! I don't want
crackers snickering and calling me names behind my back. :)


4892 01-Dec-1994 wollman

In _gethostbydnsaddr(), force RES_RECURSE into _res.options. This is
incredibly obnoxious, but also makes inverse mappings work when the local
resolver is in a cache-only configuration. (Maybe this is actually
a bug in BIND?)


3932 27-Oct-1994 rgrimes

>Description:
While trying to figure out why rlogind wasn't working right for root,
I noticed that man wouldn't come back with a man page for iruserok, but
it would for ruserok. Checking the lib/net directory's Makefile.inc
file shows that the link to the rcmd man page just isn't getting
created.
>How-To-Repeat:
Do a 'man iruserok' and notihing will come back, where a 'man ruserok'
will.

Submitted by: Brian Moore <ziff@houdini.eecs.umich.edu>
Obtained from: NetBSD-bugs mailing list


3136 26-Sep-1994 wollman

Use same configuration file, /etc/host.conf, for both gethost* and
getnet* configuration. (It's highly unlikely that you'd want to do
something different, and network lookups aren't common enough to justify
their own configuration file.)


3108 26-Sep-1994 wollman

Fixed YP networks map support.


3094 25-Sep-1994 pst

remove need for -DDEBUG from resolver code (conflict with db/hash)


3070 25-Sep-1994 pst

get* rework and new bind code


2978 22-Sep-1994 pst

Make iso_addr's output conform to modern conventions for NSAP
representation. Original code by pst but ported in as part of
enhancements to BIND 4.9.2 and returned to Vixie.


2592 08-Sep-1994 csgr

Based on fix from 1.1.5.1:
>From: jtk@atria.com (John T. Kohl)
in rcmd:
It calls select() with a hardcoded "number of file descriptors" argument
of 32, rather than computing it based on the sockets about which it
cares.

- Now we work out the nfds arg, and do some error checking
Submitted by: Geoff.


2330 28-Aug-1994 csgr

Fix gethostbyaddr():
call _getdnsbyaddr() instead of _getdnsbyname() ;-)
Submitted by: Geoff


1992 09-Aug-1994 wollman

Fixed typo.


1991 09-Aug-1994 wollman

Add (substantially re-written) support for /etc/host.conf, and reintegrated
1.1.5 support for YP, fixing a bug in 1.1.5 that prevented YP from ever
working reliably. (I'm amazed that there were no bug reports.)

IWBRNI someone could write a host.conf(5) manual page. Please look at
the code before doing so; this version is somewhat more flexible in the
format of its input.


1849 05-Aug-1994 wollman

First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.


1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.