2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

936. [func] Warn when non dotted decimal quad's are used.

[RT #1084]

 935.   [bug]           inet_pton failed to reject leading zeros.
This commit is contained in:
Mark Andrews
2001-07-16 03:06:53 +00:00
parent bd12be6e88
commit bddfe77128
47 changed files with 121 additions and 54 deletions

View File

@@ -1,3 +1,7 @@
936. [func] Warn when non dotted decimal quad's are used.
[RT #1084]
935. [bug] inet_pton failed to reject leading zeros.
934. [port] Deal with systems where accept() spuriously returns 934. [port] Deal with systems where accept() spuriously returns
ECONNRESET. ECONNRESET.

View File

@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.278 $) AC_REVISION($Revision: 1.279 $)
AC_INIT(lib/dns/name.c) AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13) AC_PREREQ(2.13)
@@ -1102,7 +1102,8 @@ AC_TRY_LINK([
# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
# addresses with less than four octets, like "1.2.3". # addresses with less than four octets, like "1.2.3". Also leading
# zeros should also be rejected.
AC_MSG_CHECKING([for inet_pton]) AC_MSG_CHECKING([for inet_pton])
AC_TRY_RUN([ AC_TRY_RUN([
@@ -1110,7 +1111,8 @@ AC_TRY_RUN([
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 0 ? 0 : 1); }], main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); }],
[AC_MSG_RESULT(yes) [AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"], ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
[AC_MSG_RESULT(no) [AC_MSG_RESULT(no)

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: gen.c,v 1.62 2001/07/06 17:35:04 gson Exp $ */ /* $Id: gen.c,v 1.63 2001/07/16 03:05:56 marka Exp $ */
#include <config.h> #include <config.h>
@@ -34,7 +34,7 @@
#include "gen-unix.h" #include "gen-unix.h"
#endif #endif
#define FROMTEXTARGS "rdclass, type, lexer, origin, downcase, target" #define FROMTEXTARGS "rdclass, type, lexer, origin, downcase, target, callbacks"
#define FROMTEXTCLASS "rdclass" #define FROMTEXTCLASS "rdclass"
#define FROMTEXTTYPE "type" #define FROMTEXTTYPE "type"
#define FROMTEXTDEF "result = DNS_R_UNKNOWN" #define FROMTEXTDEF "result = DNS_R_UNKNOWN"

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rdata.c,v 1.144 2001/07/06 20:15:08 gson Exp $ */ /* $Id: rdata.c,v 1.145 2001/07/16 03:05:57 marka Exp $ */
#include <config.h> #include <config.h>
#include <ctype.h> #include <ctype.h>
@@ -60,7 +60,8 @@
#define ARGS_FROMTEXT int rdclass, dns_rdatatype_t type, \ #define ARGS_FROMTEXT int rdclass, dns_rdatatype_t type, \
isc_lex_t *lexer, dns_name_t *origin, \ isc_lex_t *lexer, dns_name_t *origin, \
isc_boolean_t downcase, isc_buffer_t *target isc_boolean_t downcase, isc_buffer_t *target, \
dns_rdatacallbacks_t *callbacks
#define ARGS_TOTEXT dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, \ #define ARGS_TOTEXT dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, \
isc_buffer_t *target isc_buffer_t *target
@@ -179,6 +180,25 @@ static isc_result_t
rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
isc_buffer_t *target); isc_buffer_t *target);
static inline int
getquad(const void *src, struct in_addr *dst,
isc_lex_t *lexer, dns_rdatacallbacks_t *callbacks)
{
int result;
struct in_addr *tmp;
result = inet_aton(src, dst);
if (result == 1 && callbacks != NULL &&
inet_pton(AF_INET, src, &tmp) != 1) {
(*callbacks->warn)(callbacks, "%s:%lu: warning \"%s\" "
"is not a decimal dotted quad",
isc_lex_getsourcename(lexer),
isc_lex_getsourceline(lexer),
src);
}
return (result);
}
static inline isc_result_t static inline isc_result_t
name_duporclone(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) { name_duporclone(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: tsig_250.c,v 1.51 2001/06/21 04:00:28 marka Exp $ */ /* $Id: tsig_250.c,v 1.52 2001/07/16 03:05:58 marka Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */ /* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
@@ -40,6 +40,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Algorithm Name. * Algorithm Name.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: afsdb_18.c,v 1.38 2001/03/16 22:52:33 bwelling Exp $ */ /* $Id: afsdb_18.c,v 1.39 2001/07/16 03:06:00 marka Exp $ */
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */ /* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
@@ -36,6 +36,7 @@ fromtext_afsdb(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Subtype. * Subtype.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: cert_37.c,v 1.39 2001/06/21 04:00:30 marka Exp $ */ /* $Id: cert_37.c,v 1.40 2001/07/16 03:06:01 marka Exp $ */
/* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */ /* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */
@@ -38,6 +38,7 @@ fromtext_cert(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
/* /*
* Cert type. * Cert type.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: cname_5.c,v 1.42 2001/03/16 22:52:36 bwelling Exp $ */ /* $Id: cname_5.c,v 1.43 2001/07/16 03:06:03 marka Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */ /* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
@@ -35,6 +35,7 @@ fromtext_cname(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dname_39.c,v 1.33 2001/04/27 21:02:00 gson Exp $ */ /* $Id: dname_39.c,v 1.34 2001/07/16 03:06:04 marka Exp $ */
/* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */ /* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */
@@ -36,6 +36,7 @@ fromtext_dname(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: gpos_27.c,v 1.31 2001/06/21 04:00:31 marka Exp $ */ /* $Id: gpos_27.c,v 1.32 2001/07/16 03:06:05 marka Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */ /* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
@@ -37,6 +37,7 @@ fromtext_gpos(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
for (i = 0; i < 3 ; i++) { for (i = 0; i < 3 ; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token, RETERR(isc_lex_getmastertoken(lexer, &token,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: hinfo_13.c,v 1.36 2001/06/21 04:00:32 marka Exp $ */ /* $Id: hinfo_13.c,v 1.37 2001/07/16 03:06:06 marka Exp $ */
/* /*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -35,6 +35,7 @@ fromtext_hinfo(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
REQUIRE(type == 13); REQUIRE(type == 13);

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: isdn_20.c,v 1.29 2001/06/21 04:00:33 marka Exp $ */ /* $Id: isdn_20.c,v 1.30 2001/07/16 03:06:08 marka Exp $ */
/* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */
@@ -36,6 +36,7 @@ fromtext_isdn(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
/* ISDN-address */ /* ISDN-address */
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: key_25.c,v 1.40 2001/06/21 04:00:34 marka Exp $ */ /* $Id: key_25.c,v 1.41 2001/07/16 03:06:09 marka Exp $ */
/* /*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -43,6 +43,7 @@ fromtext_key(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
/* flags */ /* flags */
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: loc_29.c,v 1.29 2001/03/16 22:52:43 bwelling Exp $ */ /* $Id: loc_29.c,v 1.30 2001/07/16 03:06:10 marka Exp $ */
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */ /* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
@@ -56,6 +56,7 @@ fromtext_loc(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
/* /*
* Defaults. * Defaults.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mb_7.c,v 1.40 2001/03/16 22:52:44 bwelling Exp $ */ /* $Id: mb_7.c,v 1.41 2001/07/16 03:06:11 marka Exp $ */
/* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */
@@ -34,6 +34,7 @@ fromtext_mb(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: md_3.c,v 1.42 2001/03/16 22:52:45 bwelling Exp $ */ /* $Id: md_3.c,v 1.43 2001/07/16 03:06:13 marka Exp $ */
/* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */
@@ -34,6 +34,7 @@ fromtext_md(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mf_4.c,v 1.40 2001/03/16 22:52:46 bwelling Exp $ */ /* $Id: mf_4.c,v 1.41 2001/07/16 03:06:14 marka Exp $ */
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
@@ -34,6 +34,7 @@ fromtext_mf(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mg_8.c,v 1.38 2001/03/16 22:52:47 bwelling Exp $ */ /* $Id: mg_8.c,v 1.39 2001/07/16 03:06:15 marka Exp $ */
/* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */
@@ -34,6 +34,7 @@ fromtext_mg(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: minfo_14.c,v 1.39 2001/03/16 22:52:49 bwelling Exp $ */ /* $Id: minfo_14.c,v 1.40 2001/07/16 03:06:17 marka Exp $ */
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
@@ -35,6 +35,7 @@ fromtext_minfo(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
for (i = 0; i < 2 ; i++) { for (i = 0; i < 2 ; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token, RETERR(isc_lex_getmastertoken(lexer, &token,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mr_9.c,v 1.37 2001/03/16 22:52:50 bwelling Exp $ */ /* $Id: mr_9.c,v 1.38 2001/07/16 03:06:18 marka Exp $ */
/* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */ /* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */
@@ -34,6 +34,7 @@ fromtext_mr(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mx_15.c,v 1.47 2001/03/16 22:52:52 bwelling Exp $ */ /* $Id: mx_15.c,v 1.48 2001/07/16 03:06:19 marka Exp $ */
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */ /* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
@@ -34,6 +34,7 @@ fromtext_mx(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: ns_2.c,v 1.41 2001/03/16 22:52:53 bwelling Exp $ */ /* $Id: ns_2.c,v 1.42 2001/07/16 03:06:20 marka Exp $ */
/* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */
@@ -34,6 +34,7 @@ fromtext_ns(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token,isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token,isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: null_10.c,v 1.34 2001/06/21 04:00:36 marka Exp $ */ /* $Id: null_10.c,v 1.35 2001/07/16 03:06:22 marka Exp $ */
/* Reviewed: Thu Mar 16 13:57:50 PST 2000 by explorer */ /* Reviewed: Thu Mar 16 13:57:50 PST 2000 by explorer */
@@ -34,6 +34,7 @@ fromtext_null(ARGS_FROMTEXT) {
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(target); UNUSED(target);
UNUSED(callbacks);
return (DNS_R_SYNTAX); return (DNS_R_SYNTAX);
} }

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: nxt_30.c,v 1.48 2001/03/16 22:52:56 bwelling Exp $ */ /* $Id: nxt_30.c,v 1.49 2001/07/16 03:06:23 marka Exp $ */
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */ /* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */
@@ -46,6 +46,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Next domain. * Next domain.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: opt_41.c,v 1.24 2001/06/21 04:00:37 marka Exp $ */ /* $Id: opt_41.c,v 1.25 2001/07/16 03:06:24 marka Exp $ */
/* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */ /* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */
@@ -42,6 +42,7 @@ fromtext_opt(ARGS_FROMTEXT) {
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(target); UNUSED(target);
UNUSED(callbacks);
return (ISC_R_NOTIMPLEMENTED); return (ISC_R_NOTIMPLEMENTED);
} }

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: ptr_12.c,v 1.38 2001/03/16 22:52:58 bwelling Exp $ */ /* $Id: ptr_12.c,v 1.39 2001/07/16 03:06:26 marka Exp $ */
/* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */ /* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */
@@ -34,6 +34,7 @@ fromtext_ptr(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rp_17.c,v 1.34 2001/03/16 22:52:59 bwelling Exp $ */ /* $Id: rp_17.c,v 1.35 2001/07/16 03:06:27 marka Exp $ */
/* RFC 1183 */ /* RFC 1183 */
@@ -35,6 +35,7 @@ fromtext_rp(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
origin = (origin != NULL) ? origin : dns_rootname; origin = (origin != NULL) ? origin : dns_rootname;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rt_21.c,v 1.36 2001/03/16 22:53:00 bwelling Exp $ */ /* $Id: rt_21.c,v 1.37 2001/07/16 03:06:28 marka Exp $ */
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */ /* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
@@ -36,6 +36,7 @@ fromtext_rt(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: sig_24.c,v 1.53 2001/06/21 04:00:38 marka Exp $ */ /* $Id: sig_24.c,v 1.54 2001/07/16 03:06:29 marka Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */ /* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
@@ -42,6 +42,7 @@ fromtext_sig(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Type covered. * Type covered.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: soa_6.c,v 1.51 2001/03/16 22:53:02 bwelling Exp $ */ /* $Id: soa_6.c,v 1.52 2001/07/16 03:06:31 marka Exp $ */
/* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */ /* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */
@@ -36,6 +36,7 @@ fromtext_soa(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
origin = (origin != NULL) ? origin : dns_rootname; origin = (origin != NULL) ? origin : dns_rootname;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: tkey_249.c,v 1.47 2001/06/21 04:00:39 marka Exp $ */ /* $Id: tkey_249.c,v 1.48 2001/07/16 03:06:32 marka Exp $ */
/* /*
* Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley.
@@ -41,6 +41,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Algorithm. * Algorithm.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: txt_16.c,v 1.36 2001/06/21 04:00:41 marka Exp $ */ /* $Id: txt_16.c,v 1.37 2001/07/16 03:06:33 marka Exp $ */
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */ /* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
@@ -35,6 +35,7 @@ fromtext_txt(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
strings = 0; strings = 0;
for (;;) { for (;;) {

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: unspec_103.c,v 1.27 2001/06/21 04:00:42 marka Exp $ */ /* $Id: unspec_103.c,v 1.28 2001/07/16 03:06:35 marka Exp $ */
#ifndef RDATA_GENERIC_UNSPEC_103_C #ifndef RDATA_GENERIC_UNSPEC_103_C
#define RDATA_GENERIC_UNSPEC_103_C #define RDATA_GENERIC_UNSPEC_103_C
@@ -31,6 +31,7 @@ fromtext_unspec(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
return (atob_tobuffer(lexer, target)); return (atob_tobuffer(lexer, target));
} }

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: x25_19.c,v 1.30 2001/06/21 04:00:43 marka Exp $ */ /* $Id: x25_19.c,v 1.31 2001/07/16 03:06:36 marka Exp $ */
/* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */ /* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */
@@ -37,6 +37,7 @@ fromtext_x25(ARGS_FROMTEXT) {
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: a_1.c,v 1.24 2001/03/16 22:53:08 bwelling Exp $ */ /* $Id: a_1.c,v 1.25 2001/07/16 03:06:37 marka Exp $ */
/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */ /* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
@@ -43,7 +43,7 @@ fromtext_hs_a(ARGS_FROMTEXT) {
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));
if (inet_aton(token.value.as_pointer, &addr) != 1) if (getquad(token.value.as_pointer, &addr, lexer, callbacks) != 1)
RETTOK(DNS_R_BADDOTTEDQUAD); RETTOK(DNS_R_BADDOTTEDQUAD);
isc_buffer_availableregion(target, &region); isc_buffer_availableregion(target, &region);
if (region.length < 4) if (region.length < 4)

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: a6_38.c,v 1.44 2001/03/16 22:53:10 bwelling Exp $ */ /* $Id: a6_38.c,v 1.45 2001/07/16 03:06:39 marka Exp $ */
/* draft-ietf-ipngwg-dns-lookups-03.txt */ /* draft-ietf-ipngwg-dns-lookups-03.txt */
@@ -41,6 +41,7 @@ fromtext_in_a6(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Prefix length. * Prefix length.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: a_1.c,v 1.45 2001/03/16 22:53:11 bwelling Exp $ */ /* $Id: a_1.c,v 1.46 2001/07/16 03:06:40 marka Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -45,7 +45,7 @@ fromtext_in_a(ARGS_FROMTEXT) {
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));
if (inet_aton(token.value.as_pointer, &addr) != 1) if (getquad(token.value.as_pointer, &addr, lexer, callbacks) != 1)
RETTOK(DNS_R_BADDOTTEDQUAD); RETTOK(DNS_R_BADDOTTEDQUAD);
isc_buffer_availableregion(target, &region); isc_buffer_availableregion(target, &region);
if (region.length < 4) if (region.length < 4)

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: aaaa_28.c,v 1.35 2001/03/16 22:53:12 bwelling Exp $ */ /* $Id: aaaa_28.c,v 1.36 2001/07/16 03:06:41 marka Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -41,6 +41,7 @@ fromtext_in_aaaa(ARGS_FROMTEXT) {
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: kx_36.c,v 1.36 2001/03/16 22:53:13 bwelling Exp $ */ /* $Id: kx_36.c,v 1.37 2001/07/16 03:06:43 marka Exp $ */
/* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */ /* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */
@@ -37,6 +37,7 @@ fromtext_in_kx(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: naptr_35.c,v 1.42 2001/06/21 04:00:45 marka Exp $ */ /* $Id: naptr_35.c,v 1.43 2001/07/16 03:06:44 marka Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -37,6 +37,7 @@ fromtext_in_naptr(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Order. * Order.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: nsap-ptr_23.c,v 1.31 2001/03/16 22:53:15 bwelling Exp $ */ /* $Id: nsap-ptr_23.c,v 1.32 2001/07/16 03:06:46 marka Exp $ */
/* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */ /* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */
@@ -37,6 +37,7 @@ fromtext_in_nsap_ptr(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE)); ISC_FALSE));

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: nsap_22.c,v 1.32 2001/06/21 04:00:46 marka Exp $ */ /* $Id: nsap_22.c,v 1.33 2001/07/16 03:06:47 marka Exp $ */
/* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */ /* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */
@@ -41,6 +41,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
UNUSED(origin); UNUSED(origin);
UNUSED(downcase); UNUSED(downcase);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* 0x<hex.string.with.periods> */ /* 0x<hex.string.with.periods> */
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string, RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: px_26.c,v 1.33 2001/03/16 22:53:17 bwelling Exp $ */ /* $Id: px_26.c,v 1.34 2001/07/16 03:06:48 marka Exp $ */
/* Reviewed: Mon Mar 20 10:44:27 PST 2000 */ /* Reviewed: Mon Mar 20 10:44:27 PST 2000 */
@@ -37,6 +37,7 @@ fromtext_in_px(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Preference. * Preference.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: srv_33.c,v 1.35 2001/03/16 22:53:18 bwelling Exp $ */ /* $Id: srv_33.c,v 1.36 2001/07/16 03:06:49 marka Exp $ */
/* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */ /* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */
@@ -37,6 +37,7 @@ fromtext_in_srv(ARGS_FROMTEXT) {
UNUSED(type); UNUSED(type);
UNUSED(rdclass); UNUSED(rdclass);
UNUSED(callbacks);
/* /*
* Priority. * Priority.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: wks_11.c,v 1.43 2001/06/21 04:00:47 marka Exp $ */ /* $Id: wks_11.c,v 1.44 2001/07/16 03:06:51 marka Exp $ */
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */ /* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
@@ -62,7 +62,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
ISC_FALSE)); ISC_FALSE));
isc_buffer_availableregion(target, &region); isc_buffer_availableregion(target, &region);
if (inet_aton(token.value.as_pointer, &addr) != 1) if (getquad(token.value.as_pointer, &addr, lexer, callbacks) != 1)
RETTOK(DNS_R_BADDOTTEDQUAD); RETTOK(DNS_R_BADDOTTEDQUAD);
if (region.length < 4) if (region.length < 4)
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);

View File

@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = static char rcsid[] =
"$Id: inet_pton.c,v 1.9 2001/01/09 21:56:09 bwelling Exp $"; "$Id: inet_pton.c,v 1.10 2001/07/16 03:06:52 marka Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <config.h> #include <config.h>
@@ -96,10 +96,12 @@ inet_pton4(src, dst)
if ((pch = strchr(digits, ch)) != NULL) { if ((pch = strchr(digits, ch)) != NULL) {
unsigned int new = *tp * 10 + (pch - digits); unsigned int new = *tp * 10 + (pch - digits);
if (saw_digit && *tp == 0)
return (0);
if (new > 255) if (new > 255)
return (0); return (0);
*tp = new; *tp = new;
if (! saw_digit) { if (!saw_digit) {
if (++octets > 4) if (++octets > 4)
return (0); return (0);
saw_digit = 1; saw_digit = 1;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: net.h,v 1.30 2001/07/09 08:07:41 marka Exp $ */ /* $Id: net.h,v 1.31 2001/07/16 03:06:53 marka Exp $ */
#ifndef ISC_NET_H #ifndef ISC_NET_H
#define ISC_NET_H 1 #define ISC_NET_H 1
@@ -252,6 +252,7 @@ isc_net_ntop(int af, const void *src, char *dst, size_t size);
#ifdef ISC_PLATFORM_NEEDPTON #ifdef ISC_PLATFORM_NEEDPTON
int int
isc_net_pton(int af, const char *src, void *dst); isc_net_pton(int af, const char *src, void *dst);
#undef inet_pton
#define inet_pton isc_net_pton #define inet_pton isc_net_pton
#endif #endif