The NetBSD Project

CVS log for src/lib/libc/net/getaddrinfo.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.127 / (download) - annotate - [select for diffs], Sun Jan 21 12:58:10 2024 UTC (2 months, 3 weeks ago) by kre
Branch: MAIN
CVS Tags: HEAD
Changes since 1.126: +3 -4 lines
Diff to previous 1.126 (colored) to selected 1.118 (colored)


Unwrap a line which wasn't wrapped before it had an __UNCONST() added
to it, and now that that is gone again, doesn't need wrapping any more.

That line is now unaltered from what it was 3 revs ago (bit for bit).

NFC.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Jan 20 16:18:56 2024 UTC (2 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.125: +9 -9 lines
Diff to previous 1.125 (colored) to selected 1.118 (colored)

Make the first argument of ip6_str2scopeid const, instead of __UNCONST.
Thanks kre@. While here s/u_int32_t/uint32_t/

Revision 1.125 / (download) - annotate - [select for diffs], Sat Jan 20 14:52:48 2024 UTC (2 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.124: +6 -4 lines
Diff to previous 1.124 (colored) to selected 1.118 (colored)

Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Aug 1 08:47:25 2023 UTC (8 months, 2 weeks ago) by mrg
Branch: MAIN
Changes since 1.123: +6 -9 lines
Diff to previous 1.123 (colored) to selected 1.118 (colored)

convert explicit length check before unchecked snprintf() with just a
overflow checked snprintf().  for res_debug.c and res_query.c, convert
from sprintf() to snprintf().

tested scp and rcp fail properly with too-long paths.
tested getaddrinfo fails as expected for too-long domains.
tested dig and ping for similar (res_debug.c/res_query.c).
created a temporary fs with quotas to test edquota with a long EDITOR.
did not test ypserv directly, but it's the same pattern.

avoids GCC 12 snprintf() warnings, and reduces total code size.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Apr 19 20:32:15 2022 UTC (2 years ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.122: +6 -6 lines
Diff to previous 1.122 (colored) to selected 1.118 (colored)

lib: remove CONSTCOND comment

Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Oct 28 20:56:32 2021 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored) to selected 1.118 (colored)

Fix typo in comment: allows, not alows.

I don't know what an alow is, maybe some cousin of the alot.
Awaiting a nature documentary by Allie Brosh about these perhaps more
elusive beasts.

PR misc/56473, from jschauma

Revision 1.121 / (download) - annotate - [select for diffs], Wed Oct 27 19:24:38 2021 UTC (2 years, 5 months ago) by nia
Branch: MAIN
Changes since 1.120: +3 -4 lines
Diff to previous 1.120 (colored) to selected 1.118 (colored)

getaddrinfo(3): malloc + memset -> calloc

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Sun Nov 29 11:25:31 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) next main 1.120 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by is in ticket #1135):

	lib/libc/net/getaddrinfo.c: revision 1.120
	lib/libc/net/gethnamaddr.c: revision 1.93
	include/arpa/nameser_compat.h: revision 1.8

Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).

Revision 1.115.6.2 / (download) - annotate - [select for diffs], Sun Nov 29 11:18:54 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.115.6.1: +3 -3 lines
Diff to previous 1.115.6.1 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by is in ticket #1625):

	lib/libc/net/getaddrinfo.c: revision 1.120
	lib/libc/net/gethnamaddr.c: revision 1.93
	include/arpa/nameser_compat.h: revision 1.8

Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).

Revision 1.120 / (download) - annotate - [select for diffs], Wed Nov 18 12:49:52 2020 UTC (3 years, 5 months ago) by is
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.118 (colored)

Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).

Revision 1.117.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:20 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Sync with HEAD

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:27 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.119 / (download) - annotate - [select for diffs], Thu Dec 13 04:41:41 2018 UTC (5 years, 4 months ago) by dholland
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp
Branch point for: netbsd-9
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

Adjust English usage in message for EAI_NONAME.

Revision 1.118 / (download) - annotate - [selected], Thu Dec 13 04:30:55 2018 UTC (5 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

Return EAI_NODATA, not EAI_NONAME, for nonexistent hosts.

This causes e.g. "ssh nosuchname" to print "No address associated with
hostname", which is correct, rather than "hostname nor servname
provided, or not known", which is not.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Dec 28 15:12:15 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.116: +10 -3 lines
Diff to previous 1.116 (colored) to selected 1.118 (colored)

PR/52837: Michael Kaufmann: getaddrinfo() resolves "127.0.0.1 www.example.com"
to 127.0.0.1. Apply the patch from FreeBSD and explain the rationale.

Revision 1.115.6.1 / (download) - annotate - [select for diffs], Wed Oct 25 06:56:41 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.115: +41 -15 lines
Diff to previous 1.115 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #317):
	lib/libc/net/getaddrinfo.c: revision 1.116
	lib/libc/resolv/res_mkquery.c: revision 1.16
PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is enabled
(RFC 6840 Section 5.7).
--
PR/52578: Benjamin M. Schwartz: sync the internal copy of res_nquery for
getaddrinfo, with the real version so that we handle EDNS fallback.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Sep 29 00:04:33 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.115: +41 -15 lines
Diff to previous 1.115 (colored) to selected 1.118 (colored)

PR/52578: Benjamin M. Schwartz: sync the internal copy of res_nquery for
getaddrinfo, with the real version so that we handle EDNS fallback.

Revision 1.114.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:56:58 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.114: +84 -82 lines
Diff to previous 1.114 (colored) next main 1.115 (colored) to selected 1.118 (colored)

Sync with HEAD

Revision 1.115 / (download) - annotate - [select for diffs], Tue Jan 10 17:51:01 2017 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.114: +84 -82 lines
Diff to previous 1.114 (colored) to selected 1.118 (colored)

KNF, simplify expressions for readability.

Revision 1.114 / (download) - annotate - [select for diffs], Sat Feb 6 19:33:07 2016 UTC (8 years, 2 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.113: +8 -8 lines
Diff to previous 1.113 (colored) to selected 1.118 (colored)

Avoid shadowing global.

Revision 1.106.6.1 / (download) - annotate - [select for diffs], Fri Jan 15 18:09:19 2016 UTC (8 years, 3 months ago) by sborrill
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Changes since 1.106: +15 -24 lines
Diff to previous 1.106 (colored) next main 1.107 (colored) to selected 1.118 (colored)

Pull up to netbsd-7 (missing part of ticket #1012):
lib/libc/net/getaddrinfo.c	1.110

Revision 1.106.4.1 / (download) - annotate - [select for diffs], Fri Jan 15 17:37:45 2016 UTC (8 years, 3 months ago) by sborrill
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.106: +15 -24 lines
Diff to previous 1.106 (colored) next main 1.107 (colored) to selected 1.118 (colored)

Pull up to netbsd-7 (missing part of ticket #1012):
lib/libc/net/getaddrinfo.c		1.110

Revision 1.113 / (download) - annotate - [select for diffs], Mon Dec 14 22:07:37 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.112: +10 -4 lines
Diff to previous 1.112 (colored) to selected 1.118 (colored)

PR/50552: Kyle Amon: RFC3493 section 6.1 wants us to accept non-dotted-quad
INET4 addresses.
XXX: pullup-7

Revision 1.112 / (download) - annotate - [select for diffs], Sun Dec 13 02:02:59 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.111: +522 -3 lines
Diff to previous 1.111 (colored) to selected 1.118 (colored)

Implement the address selection policy; from FreeBSD

Revision 1.111 / (download) - annotate - [select for diffs], Wed Dec 2 18:09:53 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.110: +8 -4 lines
Diff to previous 1.110 (colored) to selected 1.118 (colored)

PR/44915: Havard Eidnes:
- Convert NS_NOTFOUND to EAI_NONAME instead
  of EAI_NODATA which more inline with what other OS's do.
- Convert NO_DATA to NS_NOTFOUND since there is no equivalent mapping
  for nsswitch (perhaps we could add one so what we could recover the exact
  error and return EAI_NODATA?)
- If we end up following a CNAME chain that does not find any data return that
  instead of internal error.

XXX: pullup-7

Revision 1.96.4.3 / (download) - annotate - [select for diffs], Tue Nov 17 09:28:05 2015 UTC (8 years, 5 months ago) by bouyer
Branch: netbsd-6
Changes since 1.96.4.2: +15 -11 lines
Diff to previous 1.96.4.2 (colored) to branchpoint 1.96 (colored) next main 1.97 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by christos in ticket #1340):
	lib/libc/net/getnetnamadr.c: revision 1.43 via patch
	lib/libc/net/getnetnamadr.c: revision 1.44 via patch
put the state back after it is used.
PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Oct 26 14:48:04 2015 UTC (8 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.109: +15 -24 lines
Diff to previous 1.109 (colored) to selected 1.118 (colored)

PR/50367: Stefan Schaeckeler: libc resolver library does not resolve host
names with underscores ("_"). According to resolv.conf(5) RES_NOCHECKNAME
is on by default; well, it is and gethostbyname(3) obeys it
(gethnamaddr.c:maybe_ok), but getaddrinfo(3) up till this commit not.
XXX: pullup-7, pullup-6

Revision 1.109 / (download) - annotate - [select for diffs], Thu Sep 10 14:05:06 2015 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.108: +4 -3 lines
Diff to previous 1.108 (colored) to selected 1.118 (colored)

namespace protect allocaddrinfo

Revision 1.108 / (download) - annotate - [select for diffs], Thu Sep 10 11:33:27 2015 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored) to selected 1.118 (colored)

mke allocaddrinfo static.

Revision 1.107 / (download) - annotate - [select for diffs], Wed Sep 9 10:06:05 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.106: +6 -2 lines
Diff to previous 1.106 (colored) to selected 1.118 (colored)

Include several libc functions in rump.ping6

We need getaddrinfo, getifaddrs, if_indextoname and if_nametoindex
in addition to getnameinfo.

Revision 1.101.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:15 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.101.2.1: +2 -1 lines
Diff to previous 1.101.2.1 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored) to selected 1.118 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.96.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:36:53 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.96.2.2: +492 -161 lines
Diff to previous 1.96.2.2 (colored) to branchpoint 1.96 (colored) next main 1.97 (colored) to selected 1.118 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.91.6.2 / (download) - annotate - [select for diffs], Mon Dec 23 23:12:44 2013 UTC (10 years, 3 months ago) by riz
Branch: netbsd-5
Changes since 1.91.6.1: +4 -3 lines
Diff to previous 1.91.6.1 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored) to selected 1.118 (colored)

Apply patch (requested by bad in ticket #1887):

src/lib/libc/net/getaddrinfo.c r1.106:
this is supposed to be re-entrant, call don't call __hostalias that uses
a static buffer.

src/lib/libc/net/gethnamaddr.c r1.85:
- don't clobber hp in the RES_USE_INET6 case
- increment naddrs in the yp case
- don't use __hostalias(), it is not thread-safe.

This should finish addressing PR lib/46454

Revision 1.96.4.2 / (download) - annotate - [select for diffs], Mon Dec 23 22:56:48 2013 UTC (10 years, 3 months ago) by riz
Branch: netbsd-6
Changes since 1.96.4.1: +4 -3 lines
Diff to previous 1.96.4.1 (colored) to branchpoint 1.96 (colored) to selected 1.118 (colored)

Apply additional patches (requested by bad in ticket #975):

src/lib/libc/net/getaddrinfo.c r1.106:
this is supposed to be re-entrant, call don't call __hostalias that uses
a static buffer.

src/lib/libc/net/gethnamaddr.c r1.85:
- don't clobber hp in the RES_USE_INET6 case
- increment naddrs in the yp case
- don't use __hostalias(), it is not thread-safe.

Fixes additional issues in PR lib/46454

Revision 1.106 / (download) - annotate - [select for diffs], Sun Dec 22 02:40:48 2013 UTC (10 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: netbsd-7-0, netbsd-7
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored) to selected 1.118 (colored)

this is supposed to be re-entrant, call don't call __hostalias that uses
a static buffer.

Revision 1.101.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:21:05 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.101: +490 -160 lines
Diff to previous 1.101 (colored) to selected 1.118 (colored)

resync from head

Revision 1.105 / (download) - annotate - [select for diffs], Mon May 13 17:54:55 2013 UTC (10 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.104: +3 -2 lines
Diff to previous 1.104 (colored) to selected 1.118 (colored)

CVE 1020946: Fix res leak.

Revision 1.104 / (download) - annotate - [select for diffs], Mon May 13 13:59:39 2013 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.103: +7 -2 lines
Diff to previous 1.103 (colored) to selected 1.118 (colored)

CVE 1020938: Fix memory leak

Revision 1.103 / (download) - annotate - [select for diffs], Fri May 3 19:31:13 2013 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.102: +417 -93 lines
Diff to previous 1.102 (colored) to selected 1.118 (colored)

PR/32373, PR/25827: Add SRV lookup in getaddrinfo(3)
Per DNS-SD (RFC 2782), but only enabled if AI_SRV is set.

Revision 1.102 / (download) - annotate - [select for diffs], Fri May 3 19:24:52 2013 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.101: +69 -69 lines
Diff to previous 1.101 (colored) to selected 1.118 (colored)

KNF, whitespace police -- no code changes

Revision 1.96.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 18:58:52 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.96.2.1: +3 -3 lines
Diff to previous 1.96.2.1 (colored) to branchpoint 1.96 (colored) to selected 1.118 (colored)

sync with head

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jun 8 07:54:14 2012 UTC (11 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored) to selected 1.118 (colored)

Henning Petersen in PR lib/46561: cosmetic change: avoid self assignement.

Revision 1.96.4.1 / (download) - annotate - [select for diffs], Sun Jun 3 21:41:34 2012 UTC (11 years, 10 months ago) by jdc
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.96: +43 -3 lines
Diff to previous 1.96 (colored) to selected 1.118 (colored)

Pull up revisions:
  src/lib/libc/net/getaddrinfo.c revision 1.98 - 1.100
  src/include/netdb.h revision 1.65
(requested by khorben in ticket #278).

Add AI_ADDRCONFIG, which makes getaddrinfo() return only address with
families
that are already configured in the system.

PR 46206: fix programmed SIGSEGV
more work is needed as tests seem to indicate that name resolution now
does no seem to work (firefox reports Server not found)
thanks to Ryo ONODERA for testing.

PR pkg/46206
re-establish fqdn lookup when AI_ADDRCONFIG is used in hints
AI_ADDRCONFIG led to fqdn lookup being skipped as the systems didn't
configure any PF_UNSPEC addresses - check was too strict here.
Thnaks to Ryo ONODERA for testing.

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:21 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.96: +54 -14 lines
Diff to previous 1.96 (colored) to selected 1.118 (colored)

sync with head

Revision 1.100 / (download) - annotate - [select for diffs], Tue Mar 20 12:04:01 2012 UTC (12 years, 1 month ago) by kardel
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.99: +6 -3 lines
Diff to previous 1.99 (colored) to selected 1.118 (colored)

PR pkg/46206
re-establish fqdn lookup when AI_ADDRCONFIG is used in hints
AI_ADDRCONFIG led to fqdn lookup being skipped as the systems didn't
configure any PF_UNSPEC addresses - check was too strict here.
Thnaks to Ryo ONODERA for testing.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Mar 20 10:34:33 2012 UTC (12 years, 1 month ago) by kardel
Branch: MAIN
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored) to selected 1.118 (colored)

PR 46206: fix programmed SIGSEGV
more work is needed as tests seem to indicate that name resolution now
does no seem to work (firefox reports Server not found)
thanks to Ryo ONODERA for testing.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Mar 17 21:56:40 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.97: +40 -3 lines
Diff to previous 1.97 (colored) to selected 1.118 (colored)

Add AI_ADDRCONFIG, which makes getaddrinfo() return only address with families
that are already configured in the system.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Mar 13 21:13:40 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.96: +13 -13 lines
Diff to previous 1.96 (colored) to selected 1.118 (colored)

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Oct 15 23:00:02 2011 UTC (12 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored) to selected 1.118 (colored)

close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
  fopen(db, "re")

Revision 1.95 / (download) - annotate - [select for diffs], Fri Oct 2 07:41:08 2009 UTC (14 years, 6 months ago) by wiz
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.94: +4 -4 lines
Diff to previous 1.94 (colored) to selected 1.118 (colored)

Revert a -> an changes: Adding an 'n' follows pronunciation, not writing.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Oct 2 06:49:23 2009 UTC (14 years, 6 months ago) by cegger
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) to selected 1.118 (colored)

fix grammar: a -> an

Revision 1.93 / (download) - annotate - [select for diffs], Fri Oct 2 02:45:29 2009 UTC (14 years, 6 months ago) by tsarna
Branch: MAIN
Changes since 1.92: +25 -8 lines
Diff to previous 1.92 (colored) to selected 1.118 (colored)

Introduce allocaddrinfo(3) to make writing getaddrinfo() nss plugins easier.
Discussed on tech-net.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Sat Jan 31 21:43:33 2009 UTC (15 years, 2 months ago) by bouyer
Branch: netbsd-4
Changes since 1.87: +8 -3 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by tls in ticket #1267):
	lib/libc/net/getaddrinfo.c: revision 1.92
Cause getaddrinfo() without socktype specification to work correctly for
numeric addresses.  The documentation appears to say this works, and some
other systems support it -- more importantly, why should it _not_ work?  If
it does not, getaddrinfo() cannot be used as a general-purpose textual to
binary address conversion utility function; yet it is the only such function
we have in the system, since inet_pton() requires a priori knowledge of the
address family.
This change also causes getaddrinfo() with NULL hint (expressly documented
as working) to work properly for numeric addresses.

Revision 1.91.6.1 / (download) - annotate - [select for diffs], Mon Jan 26 00:27:34 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.91: +8 -3 lines
Diff to previous 1.91 (colored) to selected 1.118 (colored)

Pull up following revision(s) (requested by tls in ticket #306):
	lib/libc/net/getaddrinfo.c: revision 1.92
Cause getaddrinfo() without socktype specification to work correctly for
numeric addresses.  The documentation appears to say this works, and some
other systems support it -- more importantly, why should it _not_ work?  If
it does not, getaddrinfo() cannot be used as a general-purpose textual to
binary address conversion utility function; yet it is the only such function
we have in the system, since inet_pton() requires a priori knowledge of the
address family.
This change also causes getaddrinfo() with NULL hint (expressly documented
as working) to work properly for numeric addresses.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jan 23 00:48:57 2009 UTC (15 years, 2 months ago) by tls
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.91: +8 -3 lines
Diff to previous 1.91 (colored) to selected 1.118 (colored)

Cause getaddrinfo() without socktype specification to work correctly for
numeric addresses.  The documentation appears to say this works, and some
other systems support it -- more importantly, why should it _not_ work?  If
it does not, getaddrinfo() cannot be used as a general-purpose textual to
binary address conversion utility function; yet it is the only such function
we have in the system, since inet_pton() requires a priori knowledge of the
address family.

This change also causes getaddrinfo() with NULL hint (expressly documented
as working) to work properly for numeric addresses.

Revision 1.90.10.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:18 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored) next main 1.91 (colored) to selected 1.118 (colored)

sync with head.

Revision 1.91.8.2 / (download) - annotate - [select for diffs], Sat Apr 19 07:56:35 2008 UTC (16 years ago) by lukem
Branch: christos-time_t
Changes since 1.91.8.1: +1936 -0 lines
Diff to previous 1.91.8.1 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored) to selected 1.118 (colored)

Add a missing const.

Revision 1.91.8.1, Sat Apr 19 07:56:34 2008 UTC (16 years ago) by lukem
Branch: christos-time_t
Changes since 1.91: +0 -1936 lines
FILE REMOVED

file getaddrinfo.c was added on branch christos-time_t on 2008-04-19 07:56:35 +0000

Revision 1.91 / (download) - annotate - [select for diffs], Sat Apr 19 07:56:34 2008 UTC (16 years ago) by lukem
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, matt-mips64-base2, hpcarm-cleanup-nbase, christos-time_t-nbase, christos-time_t-base
Branch point for: netbsd-5, christos-time_t
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored) to selected 1.118 (colored)

Add a missing const.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jun 29 15:53:21 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.118 (colored)

make this compile without INET6 (Scott Ellis)

Revision 1.89 / (download) - annotate - [select for diffs], Sat Jun 23 17:32:08 2007 UTC (16 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.88: +53 -45 lines
Diff to previous 1.88 (colored) to selected 1.118 (colored)

Since we are going to be looking for ports many times, use a centralized
servent data structure and pass the stayopen hint.

Revision 1.88 / (download) - annotate - [select for diffs], Thu May 10 18:44:24 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.87: +8 -5 lines
Diff to previous 1.87 (colored) to selected 1.118 (colored)

use syslog_r, from OpenBSD

Revision 1.87 / (download) - annotate - [select for diffs], Sun Oct 15 16:14:46 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Branch point for: netbsd-4
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored) to selected 1.118 (colored)

fix incomplete initializers

Revision 1.86 / (download) - annotate - [select for diffs], Sat Oct 14 21:45:29 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.85: +3 -5 lines
Diff to previous 1.85 (colored) to selected 1.118 (colored)

memset the whole struct addrinfo, instead of trying to figure out if we
have a pad member or not.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Jul 19 13:16:12 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.84: +5 -3 lines
Diff to previous 1.84 (colored) to selected 1.118 (colored)

Call endservent_r.  From Hajimu UMEMOTO

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jul 18 15:55:55 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.83: +8 -3 lines
Diff to previous 1.83 (colored) to selected 1.118 (colored)

use getservbyname_r.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Jul 18 14:00:40 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.82: +2 -26 lines
Diff to previous 1.82 (colored) to selected 1.118 (colored)

Remove comments that do not reflect reality anymore.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Mar 25 12:09:40 2006 UTC (18 years ago) by rpaulo
Branch: MAIN
Changes since 1.81: +32 -31 lines
Diff to previous 1.81 (colored) to selected 1.118 (colored)

Make macros more readable. No functional change.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Mar 21 23:56:47 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.118 (colored)

Coverity CID 2363: cur is known not to be NULL.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Mar 21 23:55:56 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.118 (colored)

Coverity CID 2364: cur is known not to be NULL.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Mar 21 23:55:02 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored) to selected 1.118 (colored)

Coverity CID 2430: cur is known not to be NULL.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Mar 21 12:08:19 2006 UTC (18 years, 1 month ago) by mjl
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored) to selected 1.118 (colored)

Correct obvious typo

Revision 1.77 / (download) - annotate - [select for diffs], Fri Feb 17 15:55:01 2006 UTC (18 years, 2 months ago) by ginsbach
Branch: MAIN
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored) to selected 1.118 (colored)

Add EAI_OVERFLOW as specified in RFC3493, POSIX and XPG6.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Feb 13 17:16:20 2006 UTC (18 years, 2 months ago) by ginsbach
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) to selected 1.118 (colored)

Fix spelling mistake in comment. From OpenBSD.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Dec 2 11:22:09 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.74: +5 -6 lines
Diff to previous 1.74 (colored) to selected 1.118 (colored)

constify and remove an unnecessary __UNCONST.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Nov 29 03:11:59 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.73: +3 -4 lines
Diff to previous 1.73 (colored) to selected 1.118 (colored)

WARNS=4

Revision 1.73 / (download) - annotate - [select for diffs], Thu Sep 15 23:33:41 2005 UTC (18 years, 7 months ago) by tsarna
Branch: MAIN
Changes since 1.72: +60 -23 lines
Diff to previous 1.72 (colored) to selected 1.118 (colored)

Rest of fix for PR#31184: getaddrinfo() now honors resolv.conf sortlist
directive for dns answers.

Also, unifdef the RESLVSORT (non-)option sillyness.

Reviewed by christos.

Revision 1.72 / (download) - annotate - [select for diffs], Thu May 27 18:40:07 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.71: +17 -24 lines
Diff to previous 1.71 (colored) to selected 1.118 (colored)

make yp stuff re-entrant.

Revision 1.71 / (download) - annotate - [select for diffs], Sun May 23 16:54:12 2004 UTC (19 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.70: +5 -8 lines
Diff to previous 1.70 (colored) to selected 1.118 (colored)

centralize res_*init() calls in __res_get_state()

Revision 1.70 / (download) - annotate - [select for diffs], Fri May 21 02:30:03 2004 UTC (19 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.69: +134 -180 lines
Diff to previous 1.69 (colored) to selected 1.118 (colored)

Finish bind9 resolver merge.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Apr 14 04:46:04 2004 UTC (20 years ago) by itojun
Branch: MAIN
Changes since 1.68: +2 -5 lines
Diff to previous 1.68 (colored) to selected 1.118 (colored)

remove prototype decl for removed function

Revision 1.68 / (download) - annotate - [select for diffs], Wed Apr 14 04:45:28 2004 UTC (20 years ago) by itojun
Branch: MAIN
Changes since 1.67: +2 -13 lines
Diff to previous 1.67 (colored) to selected 1.118 (colored)

remove unused code

Revision 1.67 / (download) - annotate - [select for diffs], Wed Apr 14 04:37:06 2004 UTC (20 years ago) by itojun
Branch: MAIN
Changes since 1.66: +16 -49 lines
Diff to previous 1.66 (colored) to selected 1.118 (colored)

implement AI_NUMERICSERV (as defined in RFC3493)

Revision 1.66 / (download) - annotate - [select for diffs], Sat May 17 01:36:03 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.65: +4 -5 lines
Diff to previous 1.65 (colored) to selected 1.118 (colored)

bound copies

Revision 1.65 / (download) - annotate - [select for diffs], Thu May 8 05:30:53 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.64: +27 -9 lines
Diff to previous 1.64 (colored) to selected 1.118 (colored)

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

Revision 1.64 / (download) - annotate - [select for diffs], Mon Mar 17 23:10:25 2003 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored) to selected 1.118 (colored)

From: "Jason L. Wright" <jason@thought.net>

The man page for getaddrinfo() and RFC2553 says it should return EAI_NONAME
for the case where hostname != NULL, hostname is not a numeric string and
ai_flags has the AI_NUMERICHOST bit set.  Instead, it returns EAI_NODATA
for this case.  The diff below makes it return EAI_NONAME for this case.

This is why ntpq and ntpdc from ntp-4.1.74 can't resolve hostnames,
but work fine with numeric strings like ::1 or 127.0.0.1.

Revision 1.42.4.5 / (download) - annotate - [select for diffs], Wed Sep 4 02:30:49 2002 UTC (21 years, 7 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.42.4.4: +89 -53 lines
Diff to previous 1.42.4.4 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored) to selected 1.118 (colored)

lib/libc/net/getaddrinfo.c			1.56
lib/libc/net/res_mkquery.c			1.22
  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.

lib/libc/net/getaddrinfo.c			1.50
  remove redundant declarations of h_errno and __hostalias

lib/libc/net/getaddrinfo.c			1.52
  make sure "qname" argument to getanswer() is properly given.  from lukem

lib/libc/net/getaddrinfo.c			1.54
lib/libc/net/gethnamaddr.c			1.43,1.49-1.50
lib/libc/net/getnetnamadr.c			1.23
  use snprintf, string manipulation cleanups

lib/libc/net/getaddrinfo.c			1.57-1.59
  correct port range check and signed/unsigned mixup

lib/libc/net/getaddrinfo.c			1.60-1.61
  lint clean

lib/libc/net/getaddrinfo.c			1.62
lib/libc/net/gethnamaddr.c			1.51
  drop AAAA reply with IPv4 mapped address.  sync w/kame
  draft-itojun-v6ops-v4mapped-harmful-00.txt

lib/libc/net/getaddrinfo.c			1.63
lib/libc/net/gethnamaddr.c			1.52
lib/libc/net/getnetnamadr.c			1.24
  allocate 64K recieve buffer for DNS responses.

lib/libc/net/gethnamaddr.c			1.38
  Varargsify dprintf to allow for format string checking

lib/libc/net/gethnamaddr.c			1.39
lib/libc/net/getnetnamadr.c			1.20
  remove redundant declarations.

lib/libc/net/gethnamaddr.c			1.41
  do not reverse-lookup scoped IPv6 address.  it does not make sense as
  there's no way to give scope identifier.  sync w/kame

lib/libc/net/gethnamaddr.c			1.42
  style

lib/libc/net/gethnamaddr.c			1.45
  do not pass uninitialized variable to nsdispatch().

lib/libc/net/gethnamaddr.c			1.48
  query ip6.arpa then ip6.int for IPv6 reverse lookup.  follows RFC3152.

Revision 1.53.2.4 / (download) - annotate - [select for diffs], Tue Aug 27 23:49:33 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.53.2.3: +42 -19 lines
Diff to previous 1.53.2.3 (colored) next main 1.54 (colored) to selected 1.118 (colored)

Catch up to -current.

Revision 1.55.2.6 / (download) - annotate - [select for diffs], Tue Aug 27 09:23:35 2002 UTC (21 years, 7 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.55.2.5: +36 -21 lines
Diff to previous 1.55.2.5 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored) to selected 1.118 (colored)

Pull up revision 1.63 (requested by itojun in ticket #735):
allocate 64K recieve buffer for DNS responses.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Aug 27 08:50:49 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.62: +36 -21 lines
Diff to previous 1.62 (colored) to selected 1.118 (colored)

allocate 64K recieve buffer for DNS responses.

Revision 1.55.2.5 / (download) - annotate - [select for diffs], Sat Aug 24 02:57:09 2002 UTC (21 years, 8 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.55.2.4: +10 -2 lines
Diff to previous 1.55.2.4 (colored) to branchpoint 1.55 (colored) to selected 1.118 (colored)

Pull up revision 1.62 (requested by itojun in ticket #718):
drop AAAA reply with IPv4 mapped address.  sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt

Revision 1.62 / (download) - annotate - [select for diffs], Thu Aug 22 16:32:14 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.61: +10 -2 lines
Diff to previous 1.61 (colored) to selected 1.118 (colored)

drop AAAA reply with IPv4 mapped address.  sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt

Revision 1.55.2.4 / (download) - annotate - [select for diffs], Sat Aug 17 15:44:41 2002 UTC (21 years, 8 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.55.2.3: +8 -11 lines
Diff to previous 1.55.2.3 (colored) to branchpoint 1.55 (colored) to selected 1.118 (colored)

Pull up revision 1.56 (requested by itojun in ticket #693):
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.
this fix is NOT critical.

Revision 1.53.2.3 / (download) - annotate - [select for diffs], Thu Aug 1 03:28:13 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.53.2.2: +28 -25 lines
Diff to previous 1.53.2.2 (colored) to selected 1.118 (colored)

Catch up to -current.

Revision 1.55.2.3 / (download) - annotate - [select for diffs], Tue Jul 2 06:46:53 2002 UTC (21 years, 9 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RC1
Changes since 1.55.2.2: +14 -13 lines
Diff to previous 1.55.2.2 (colored) to branchpoint 1.55 (colored) to selected 1.118 (colored)

Pull up revision 1.60 (requested by itojun in ticket #417):
lint clean.  from martin husemann

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Tue Jul 2 06:34:31 2002 UTC (21 years, 9 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.55.2.1: +13 -9 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored) to selected 1.118 (colored)

Pull up revision 1.59 (requested by itojun in ticket #417):
make more pedantic check on strtoul.  from deraadt, sync w/kame

Revision 1.61 / (download) - annotate - [select for diffs], Mon Jul 1 22:05:08 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.118 (colored)

pacify lint.  from he@netbsd

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jul 1 21:05:56 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.59: +14 -13 lines
Diff to previous 1.59 (colored) to selected 1.118 (colored)

lint clean.  from martin husemann

Revision 1.42.4.4 / (download) - annotate - [select for diffs], Mon Jul 1 18:21:00 2002 UTC (21 years, 9 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.42.4.3: +4 -3 lines
Diff to previous 1.42.4.3 (colored) to branchpoint 1.42 (colored) to selected 1.118 (colored)

Pull up revision 1.58 (requested by itojun):
  Correct port range check.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 1 07:42:49 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.58: +13 -9 lines
Diff to previous 1.58 (colored) to selected 1.118 (colored)

make more pedantic check on strtoul.  from deraadt, sync w/kame

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Sat Jun 29 22:48:11 2002 UTC (21 years, 9 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.55: +4 -3 lines
Diff to previous 1.55 (colored) to selected 1.118 (colored)

Pull up revision 1.58 (requested by itojun in ticket #401):
correct port range check.  from deraadt, sync w/kame, diff sent to bind-bugs

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 29 12:23:10 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored) to selected 1.118 (colored)

correct port range check.  from deraadt, sync w/kame, diff sent to bind-bugs

Revision 1.57 / (download) - annotate - [select for diffs], Thu Jun 27 10:22:07 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.118 (colored)

correct %d/%u mixup.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jun 26 06:00:26 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.55: +8 -11 lines
Diff to previous 1.55 (colored) to selected 1.118 (colored)

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.

this fix is NOT critical.

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Fri Jun 21 18:18:14 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.53.2.1: +5 -2 lines
Diff to previous 1.53.2.1 (colored) to selected 1.118 (colored)

Catch up to -current.

Revision 1.55 / (download) - annotate - [select for diffs], Tue May 14 13:45:14 2002 UTC (21 years, 11 months ago) by kleink
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.54: +5 -2 lines
Diff to previous 1.54 (colored) to selected 1.118 (colored)

struct addrinfo.ai_addrlen used to be a size_t, per RFC 2553.

In XNS5.2, and subsequently in POSIX-2001 and draft-ietf-ipngwg-rfc2553bis-02
it was changed to a socklen_t.

To accomodate for this while preserving binary compatibility with the
old interface, prepend or append 32 bits of padding, depending on
the (LP64 data model) architecture's endianness.

This should be deleted the next time the libc major number is
incremented.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Mon Oct 8 20:20:07 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.118 (colored)

Catch up to -current.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Aug 20 02:33:31 2001 UTC (22 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.118 (colored)

use snprintf, not sprintf.  sync with kame.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jan 25 22:50:55 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.52: +5 -4 lines
Diff to previous 1.52 (colored) to selected 1.118 (colored)

make local constant arrays const

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jan 24 15:05:48 2001 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.51: +6 -2 lines
Diff to previous 1.51 (colored) to selected 1.118 (colored)

make sure "qname" argument to getanswer() is properly given.  from lukem

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jan 4 03:57:58 2001 UTC (23 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.50: +85 -10 lines
Diff to previous 1.50 (colored) to selected 1.118 (colored)

sprinkle _DIAGASSERT() around

Revision 1.50 / (download) - annotate - [select for diffs], Sun Dec 10 04:19:53 2000 UTC (23 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.49: +2 -5 lines
Diff to previous 1.49 (colored) to selected 1.118 (colored)

remove redundant declarations of h_errno and __hostalias

Revision 1.49 / (download) - annotate - [select for diffs], Sat Sep 23 04:40:19 2000 UTC (23 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.48: +5 -3 lines
Diff to previous 1.48 (colored) to selected 1.118 (colored)

don't bother declaring in6_addrany[] and in6_loopback #ifndef INET6

Revision 1.42.4.3 / (download) - annotate - [select for diffs], Thu Aug 31 23:16:58 2000 UTC (23 years, 7 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.42.4.2: +8 -5 lines
Diff to previous 1.42.4.2 (colored) to branchpoint 1.42 (colored) to selected 1.118 (colored)

pullup 1.47 -> 1.48 (approved by releng-1-5)

 > on /etc/hosts lookup, set "official host name" (the leftmost hostname)
 > into ai_canonname.  this is to synchronize with practice in gethostby*.
 > comment from ume@mahoroba.org.  sync with kame.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Aug 31 17:32:39 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.47: +8 -5 lines
Diff to previous 1.47 (colored) to selected 1.118 (colored)

on /etc/hosts lookup, set "official host name" (the leftmost hostname)
into ai_canonname.  this is to synchronize with practice in gethostby*.
comment from ume@mahoroba.org.  sync with kame.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Aug 9 14:41:00 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.46: +6 -2 lines
Diff to previous 1.46 (colored) to selected 1.118 (colored)

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.

Revision 1.42.4.2 / (download) - annotate - [select for diffs], Thu Jul 13 05:51:20 2000 UTC (23 years, 9 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.42.4.1: +18 -18 lines
Diff to previous 1.42.4.1 (colored) to branchpoint 1.42 (colored) to selected 1.118 (colored)

pullup 1.42 -> 1.43: (approved by releng-1-5)
return EAI_NODATA, instead of EAI_NONAME, on name resolution errors.
EAI_NONAME does not make sense in these situations.  from kame.
From: enami@netbsd.org

Revision 1.42.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 01:10:58 2000 UTC (23 years, 9 months ago) by thorpej
Branch: netbsd-1-5
Changes since 1.42: +11 -10 lines
Diff to previous 1.42 (colored) to selected 1.118 (colored)

Pull up rev. 1.45 (itojun):
use strtoul() to check for all-digit string, not isdigit().  sync with kame.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jul 9 04:48:17 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.45: +9 -3 lines
Diff to previous 1.45 (colored) to selected 1.118 (colored)

reject empty scopeid/numeric portname explicitly.  sync with kame.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jul 9 04:23:49 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.44: +11 -10 lines
Diff to previous 1.44 (colored) to selected 1.118 (colored)

use strtoul() to check for all-digit string, not isdigit().  sync with kame.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jul 7 08:03:38 2000 UTC (23 years, 9 months ago) by itohy
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored) to selected 1.118 (colored)

Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems.  On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems.  However, we leave the isascii()
untouched for now, so as not to change the current behavior.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jul 5 12:41:16 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.42: +19 -19 lines
Diff to previous 1.42 (colored) to selected 1.118 (colored)

return EAI_NODATA, instead of EAI_NONAME, on name resolution errors.
EAI_NONAME does not make sense in these situations.  from kame.
From: enami@netbsd.org

Revision 1.42 / (download) - annotate - [select for diffs], Thu Apr 27 05:30:22 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.41: +17 -17 lines
Diff to previous 1.41 (colored) to selected 1.118 (colored)

remove unused struct def.  more sanity check for NULL.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Apr 26 16:08:10 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored) to selected 1.118 (colored)

add $KAME$

Revision 1.40 / (download) - annotate - [select for diffs], Wed Apr 26 12:25:51 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.39: +11 -3 lines
Diff to previous 1.39 (colored) to selected 1.118 (colored)

disable AI_ADDRCONFIG (post RFC2553 specification),
it has bug in PF_UNSPEC caes.  From: ume
fix boundary check which was broken by delint in the past.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Apr 24 10:40:24 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.38: +6 -1 lines
Diff to previous 1.38 (colored) to selected 1.118 (colored)

add __RCSID().

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 24 09:27:31 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.37: +8 -1 lines
Diff to previous 1.37 (colored) to selected 1.118 (colored)

supply weak alias for IPv6-related library additions.  sorry to be late.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 3 01:12:26 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored) to selected 1.118 (colored)

in yphostent, initialize res0 when getaddrinfo fails.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Apr 2 21:30:37 2000 UTC (24 years ago) by christos
Branch: MAIN
Changes since 1.35: +15 -16 lines
Diff to previous 1.35 (colored) to selected 1.118 (colored)

Delint:
	- add notreached comment
	- remove unused variables
	- cast to void * first to avoid casting warnings
	- fix bug in _yphostent where cur and sentinel were not
	  being initialized.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 16 13:51:43 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored) to selected 1.118 (colored)

visit all requests even if we get errors from name server.
this will solve name query failures for IPv4-only node, when
the DNS server returns SERVFAIL or NXDOMAIN (should success with an == 0).
PR: 9621

Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 22 05:47:15 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.33: +3 -1 lines
Diff to previous 1.33 (colored) to selected 1.118 (colored)

avoid memory leak on valid FQDN + invalid port name.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Feb 20 17:07:01 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.32: +15 -13 lines
Diff to previous 1.32 (colored) to selected 1.118 (colored)

query NIS hosts.byname only when necessary (= PF_UNSPEC of PF_INET queries).

Revision 1.32 / (download) - annotate - [select for diffs], Sun Feb 20 14:44:30 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.31: +951 -142 lines
Diff to previous 1.31 (colored) to selected 1.118 (colored)

to honor the search order defined by nsswitch.conf,
getaddrinfo(3) now calls lower-layer resolver functions directly.

XXX code duplicate with gethnamaddr.c/res_search.c - future code
maintenance issue?  Since BIND[89] does not address this issue either at
this moment, switching to BIND[89] does not help.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Feb 17 17:06:17 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored) to selected 1.118 (colored)

to synchronize with progress of discussion for post
draft-ietf-ipngwg-scopedaddr-format-00.txt (will be 01),
use "address%interface" notation for extended scoped IPv6 address.

NOTE: the change affects link-local addresses only.  I hope it to be
the final change on it.....

Revision 1.30 / (download) - annotate - [select for diffs], Wed Feb 16 04:50:23 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.29: +36 -4 lines
Diff to previous 1.29 (colored) to selected 1.118 (colored)

preparation to flip extended scoped address syntax.

the specification is still under debate; there is high possibility that
"fe80::1%de0" will be the finalist but i'm not sure yet.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Feb 15 18:55:55 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored) to selected 1.118 (colored)

make it possible to compile it without -DINET6
From: "Castor Fu" <castor@geocast.com>

Revision 1.28 / (download) - annotate - [select for diffs], Thu Feb 10 03:06:53 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored) to selected 1.118 (colored)

sa_len was not properly set due to autoconf #ifdef.
(mistake in yesterday's upgrade)

Revision 1.27 / (download) - annotate - [select for diffs], Wed Feb 9 12:25:06 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.26: +134 -77 lines
Diff to previous 1.26 (colored) to selected 1.118 (colored)

revise extended scoped address format support.  delimiter and the order
is changed, based on discussion in ipngwg scoped address cabal.
past code:	fe80::1@de0
now:		de0%fe80::1
this will be in sync with next extended address format proposal
(which should be final - I don't want to make this kind of change again).

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 28 08:09:48 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored) to selected 1.118 (colored)

backout previous commit - freeaddrinfo(NULL) issue.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jan 27 08:25:51 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.24: +4 -3 lines
Diff to previous 1.24 (colored) to selected 1.118 (colored)

allow freeaddrinfo(NULL).  nothing is talked in RFC2553 (maybe in X/Open?).
however, since NRL freeaddrinfo permits it, we need to.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 26 06:51:29 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.23: +10 -126 lines
Diff to previous 1.23 (colored) to selected 1.118 (colored)

fix RFC2553 conformance.  AI_CANONNAME does not mean reverse query.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 24 03:08:12 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.22: +8 -4 lines
Diff to previous 1.22 (colored) to selected 1.118 (colored)

fix comment.
better sync with kame tree.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jan 23 04:03:21 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.21: +6 -15 lines
Diff to previous 1.21 (colored) to selected 1.118 (colored)

remove #if 0'ed portion (AF filtering in normal name resolution)
add comment to the fragment which confused mycroft

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 23 01:37:19 2000 UTC (24 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +5 -1 lines
Diff to previous 1.20 (colored) to selected 1.118 (colored)

Doh.  I'm a dork.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jan 22 23:54:20 2000 UTC (24 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +18 -23 lines
Diff to previous 1.19 (colored) to selected 1.118 (colored)

Partially delint.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jan 17 15:57:29 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored) to selected 1.118 (colored)

do not filter address families that are not supported by kernel.
the behavior was introduced in 1.8 -> 1.9, by itojun, and it was
not a correct behavior.

even if we may be able to connect to the the returned addresses,
filtering them out is not a correct thing to do.  for example, even if
you have partial unreachablility in IPv4, gethostbyname(3) will return
IPv4 addresses in the unreachable network nonetheless.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jan 17 08:34:04 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.17: +1 -36 lines
Diff to previous 1.17 (colored) to selected 1.118 (colored)

remove #if 0'ed sections.

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:29:41 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.13: +787 -421 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.118 (colored)

Pull up to last week's -current.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Dec 27 10:20:59 1999 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored) to selected 1.118 (colored)

properly check the error result from if_nametoindex(), to disallow
bogus interface index specification like fe80::1@bogus.
(sync with kame)

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 13 17:05:45 1999 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.15: +36 -12 lines
Diff to previous 1.15 (colored) to selected 1.118 (colored)

more complete solution for gethostby*() buffer overwrite issue.
(we need thread-safe gethostby*...)

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 13 16:22:56 1999 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.14: +43 -6 lines
Diff to previous 1.14 (colored) to selected 1.118 (colored)

fix getaddrinfo(3) and getnameinfo(3).

getaddrinfo(3): result from gethostby* will be broken if we call it again.
deep-copy them.  we have sa_len so configure them.
getnameinfo(3): we have sa_len so configure them.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 13 14:18:32 1999 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.13: +723 -418 lines
Diff to previous 1.13 (colored) to selected 1.118 (colored)

bring in latest KAME get{addr,name}info(3).
getnameinfo(3) globs ai_socktype and ai_protocol correctly.
KAME scopeid extension is implemented.
(draft-ietf-ipngwg-scopedaddr-format-00.txt)

bump up shlib minor
(may not be necessary, but rather big difference in behavior - especially
ai_flags)

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 20 04:39:11 1999 UTC (24 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize
Changes since 1.12: +1 -11 lines
Diff to previous 1.12 (colored) to selected 1.118 (colored)

back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Sep 16 11:45:11 1999 UTC (24 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.11: +49 -8 lines
Diff to previous 1.11 (colored) to selected 1.118 (colored)

* use _DIAGASSERT() to check pointer arguments against NULL and file
  descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif

Revision 1.11 / (download) - annotate - [select for diffs], Sun Aug 22 12:54:02 1999 UTC (24 years, 8 months ago) by kleink
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored) to selected 1.118 (colored)

Need "namespace.h".

Revision 1.10 / (download) - annotate - [select for diffs], Fri Aug 13 09:45:51 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored) to selected 1.118 (colored)

pacify too-picky compiler.

From: onoe@sm.sony.co.jp

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jul 14 22:10:03 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.8: +21 -6 lines
Diff to previous 1.8 (colored) to selected 1.118 (colored)

- do not make query for AFs that are not supported by kernel.
  i.e. do not make query for IPv6 addresses, when running on non-IPv6 kernel,
  or, do not query for IPv4 address on IPv6-only kernel :-)

  This kind of behavior is not very well documented in RFC2553.  This
  may violate the spec.

- on EAI_AGAIN, only retry 3 times (3 is a magic number).  Previous code
  made retries forever.  This solves situation where name server is wrongly
  configured and nameserver:53 returns icmp port unreach.

The only proper fix for all getaddrinfo() related twists would be to
implement getipnodebyname() and get rid of wacky get_addr().
We need to contribute bind8 development for this.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 6 02:00:41 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored) to selected 1.118 (colored)

fix name resolution problem when you have "hosts: files dns" on
/etc/nsswitch.conf.

This was because of two reasons:
- /etc/hosts lookup code damaged some of internal
  state used by gethostbyname2().
- getaddrinfo() was not persistent enough against errors.

Sorry for the delay, and hope this fix all the following PRs
(I checked in my environment immitating those PRs and it worked for me)
PR: 7901, 7912, 7921

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 4 02:02:29 1999 UTC (24 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.6: +12 -12 lines
Diff to previous 1.6 (colored) to selected 1.118 (colored)

capitalize the first word of most error strings except those words that are
argument names to the function. e.g, if `const char *servname' is an argument
name, keep using "servname invalid [...]" instead of "Servname invalid [...]"

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 4 00:43:43 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.5: +2 -0 lines
Diff to previous 1.5 (colored) to selected 1.118 (colored)

add NetBSD RCSID on top.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jul 4 00:34:20 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored) to selected 1.118 (colored)

fix USE_GETIPNODEBY case.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 4 00:33:14 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.3: +22 -7 lines
Diff to previous 1.3 (colored) to selected 1.118 (colored)

fix behavior when there's dangling CNAME on specific AF.
TODO: have getipnodeby{name,addr} and let them do the trick.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jul 3 14:29:29 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored) to selected 1.118 (colored)

improve lint friendliness on USE_GETIPNODEBY case.
(no change in behavior)

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jul 3 07:00:42 1999 UTC (24 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.1: +15 -15 lines
Diff to previous 1.1 (colored) to selected 1.118 (colored)

remove trailing `.' on error messages, since messages from strerror() and
h_strerror() don't return messages with a trailing `.' (and the `.' looks
ugly when using warnx() with the error message).

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jul 1 18:23:54 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Diff to selected 1.118 (colored)

add IPv6 support functions.

get{addr,name} info are implemented to have as little impact to existing
resolver code as possible, so they are NOT the optimal implementation.
They are at this moment not very thread safe (as they call
gethostby{name,addr}).

(shlib minor version)++, as new interfaces are added.

TODO: getipnodeby{name,addr} - which needs total reimplementation of
gethostby{name,addr}.
upgrade rcmd.c for multiple af support (needed for IPv6-ready rsh/rlogin)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>