Commit 34b394b4 authored by David Lawrence's avatar David Lawrence
Browse files

DNS_R_RANGE -> ISC_R_RANGE

parent ad418d66
180. [func] New isc_result_t ISC_R_RANGE. Supersedes DNS_R_RANGE.
179. [func] options named.conf statement *must* now come
before any zone or view statements.
......@@ -30,7 +32,7 @@
master files because totext_ctx_init() failed to
initialize ctx->current_ttl_valid.
171. [cleanup] On NetBSD systems, the mit-pthreads or
171. [cleanup] On NetBSD systems, the mit-pthreads or
unproven-pthreads library is now always used
unless --with-ptl2 is explicitly specified on
the configure command line. The
......
......@@ -219,11 +219,11 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
proto = ckey->pubkey->protocol;
alg = ckey->pubkey->algorithm;
if (flags < 0 || flags > 0xffff)
CHECKM(DNS_R_RANGE, "key flags");
CHECKM(ISC_R_RANGE, "key flags");
if (proto < 0 || proto > 0xff)
CHECKM(DNS_R_RANGE, "key protocol");
CHECKM(ISC_R_RANGE, "key protocol");
if (alg < 0 || alg > 0xff)
CHECKM(DNS_R_RANGE, "key algorithm");
CHECKM(ISC_R_RANGE, "key algorithm");
keystruct.flags = flags;
keystruct.protocol = proto;
keystruct.algorithm = alg;
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrout.c,v 1.61 2000/05/10 03:33:52 tale Exp $ */
/* $Id: xfrout.c,v 1.62 2000/05/15 21:14:01 tale Exp $ */
#include <config.h>
......@@ -999,7 +999,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
current_serial,
&data_stream);
if (result == ISC_R_NOTFOUND ||
result == DNS_R_RANGE) {
result == ISC_R_RANGE) {
xfrout_log1(client, question_name, ISC_LOG_DEBUG(4),
"IXFR version not in journal, "
"falling back to AXFR");
......
......@@ -483,7 +483,7 @@ uint16_tobuffer(isc_uint32_t value, isc_buffer_t *target);</CODE></DT>
<P>
Write them 16 bit <CODE>value</CODE> in network order to <CODE>target</CODE>.
<P>
Returns <CODE>DNS_R_RANGE</CODE>, <CODE>DNS_R_NOSPACE</CODE> and <CODE>DNS_R_SUCCESS</CODE>.
Returns <CODE>ISC_R_RANGE</CODE>, <CODE>DNS_R_NOSPACE</CODE> and <CODE>DNS_R_SUCCESS</CODE>.
<P>
<DT><CODE>static isc_uint32_t<BR>
uint32_fromregion(isc_region_t *region);</CODE></DT>
......@@ -583,7 +583,7 @@ Take the date in <CODE>source</CODE> and convert it seconds since January 1,
1970 (ignoring leap seconds) and place the least significant 32 bits into
<CODE>target</CODE>.
<P>
Returns <CODE>DNS_R_RANGE</CODE>, <CODE>DNS_R_SYNTAX</CODE>,
Returns <CODE>ISC_R_RANGE</CODE>, <CODE>DNS_R_SYNTAX</CODE>,
<CODE>DNS_R_NOSPACE</CODE> and <CODE>DNS_R_SUCCESS</CODE>.
</DL>
<H2><A NAME="macros">Support Macros<A></H2>
......
......@@ -24,7 +24,8 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source);
isc_result_t
dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source);
/*
* Convert the text 'source' refers to into a certificate type.
* The text may contain either a mnemonic type name or a decimal type number.
......@@ -36,11 +37,12 @@ isc_result_t dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source);
*
* Returns:
* ISC_R_SUCCESS on success
* ISC_R_RANGE numeric type is out of range
* DNS_R_UNKNOWN mnemonic type is unknown
* DNS_R_RANGE numeric type is out of range
*/
isc_result_t dns_cert_totext(dns_cert_t cert, isc_buffer_t *target);
isc_result_t
dns_cert_totext(dns_cert_t cert, isc_buffer_t *target);
/*
* Put a textual representation of certificate type 'cert' into 'target'.
*
......
......@@ -432,10 +432,10 @@ dns_journal_iter_init(dns_journal_t *j,
*
* Returns:
* ISC_R_SUCCESS
* ISC_R_RANGE begin_serial is outside the addressable range.
* ISC_R_NOTFOUND begin_serial is within the range of adressable
* serial numbers covered by the journal, but
* this particular serial number does not exist.
* DNS_R_RANGE begin_serial is outside the addressable range.
*/
isc_result_t
......
......@@ -24,8 +24,8 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_keyflags_fromtext(dns_keyflags_t *flagsp,
isc_textregion_t *source);
isc_result_t
dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source);
/*
* Convert the text 'source' refers to into a DNSSEC KEY flags value.
* The text may contain either a set of flag mnemonics separated by
......@@ -41,8 +41,8 @@ isc_result_t dns_keyflags_fromtext(dns_keyflags_t *flagsp,
*
* Returns:
* ISC_R_SUCCESS on success
* ISC_R_RANGE numeric flag value is out of range
* DNS_R_UNKNOWN mnemonic flag is unknown
* DNS_R_RANGE numeric flag value is out of range
*/
ISC_LANG_ENDDECLS
......
......@@ -49,7 +49,7 @@
#define DNS_R_EXTRATOKEN (ISC_RESULTCLASS_DNS + 12)
#define DNS_R_EXTRADATA (ISC_RESULTCLASS_DNS + 13)
#define DNS_R_TEXTTOOLONG (ISC_RESULTCLASS_DNS + 14)
#define DNS_R_RANGE (ISC_RESULTCLASS_DNS + 15)
/* 15 is unused */
#define DNS_R_SYNTAX (ISC_RESULTCLASS_DNS + 16)
#define DNS_R_BADCKSUM (ISC_RESULTCLASS_DNS + 17)
#define DNS_R_BADAAAA (ISC_RESULTCLASS_DNS + 18)
......
......@@ -24,8 +24,8 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_secalg_fromtext(dns_secalg_t *secalgp,
isc_textregion_t *source);
isc_result_t
dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source);
/*
* Convert the text 'source' refers to into a DNSSEC security algorithm value.
* The text may contain either a mnemonic algorithm name or a decimal algorithm
......@@ -38,11 +38,12 @@ isc_result_t dns_secalg_fromtext(dns_secalg_t *secalgp,
*
* Returns:
* ISC_R_SUCCESS on success
* ISC_R_RANGE numeric type is out of range
* DNS_R_UNKNOWN mnemonic type is unknown
* DNS_R_RANGE numeric type is out of range
*/
isc_result_t dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target);
isc_result_t
dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target);
/*
* Put a textual representation of the DNSSEC security algorithm 'secalg'
* into 'target'.
......
......@@ -24,8 +24,8 @@
ISC_LANG_BEGINDECLS
isc_result_t dns_secproto_fromtext(dns_secproto_t *secprotop,
isc_textregion_t *source);
isc_result_t
dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source);
/*
* Convert the text 'source' refers to into a DNSSEC security protocol value.
* The text may contain either a mnemonic protocol name or a decimal protocol
......@@ -38,8 +38,8 @@ isc_result_t dns_secproto_fromtext(dns_secproto_t *secprotop,
*
* Returns:
* ISC_R_SUCCESS on success
* ISC_R_RANGE numeric type is out of range
* DNS_R_UNKNOWN mnemonic type is unknown
* DNS_R_RANGE numeric type is out of range
*/
isc_result_t
......
......@@ -1389,7 +1389,7 @@ index_invalidate(dns_journal_t *j, isc_uint32_t serial) {
* (from the journal, not just from the index), return ISC_R_NOTFOUND.
*
* If 'serial' is outside the range of addressable serial numbers
* covered by the journal, return DNS_R_RANGE.
* covered by the journal, return ISC_R_RANGE.
*
*/
static isc_result_t
......@@ -1399,9 +1399,9 @@ journal_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *pos) {
REQUIRE(DNS_JOURNAL_VALID(j));
if (DNS_SERIAL_GT(j->header.begin.serial, serial))
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (DNS_SERIAL_GT(serial, j->header.end.serial))
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (serial == j->header.end.serial) {
*pos = j->header.end;
return (ISC_R_SUCCESS);
......
......@@ -93,7 +93,8 @@ dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
{
dns_rdatasetiter_current(rdsiter, &rdataset);
if (rdataset.type > 127)
return DNS_R_RANGE; /* XXX "rdataset type too large" */
/* XXX "rdataset type too large" */
return (ISC_R_RANGE);
if (rdataset.type != dns_rdatatype_nxt) {
if (rdataset.type > max_type)
max_type = rdataset.type;
......@@ -102,7 +103,9 @@ dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
dns_rdataset_disassociate(&rdataset);
}
/* At zone cuts, deny the existence of glue in the parent zone. */
/*
* At zone cuts, deny the existence of glue in the parent zone.
*/
if (bit_isset(nxt_bits, dns_rdatatype_ns) &&
! bit_isset(nxt_bits, dns_rdatatype_soa)) {
for (i = 0; i < 128; i++) {
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rdata.c,v 1.89 2000/05/14 02:02:24 tale Exp $ */
/* $Id: rdata.c,v 1.90 2000/05/15 21:14:07 tale Exp $ */
#include <config.h>
......@@ -696,7 +696,7 @@ dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
n = strtoul(buffer, &e, 10);
if (*e == 0) {
if (n > max)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
*valuep = n;
return (ISC_R_SUCCESS);
}
......@@ -923,7 +923,7 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
n = strtoul(buffer, &e, 0); /* Allow hex/octal. */
if (*e == 0) {
if (n > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
*flagsp = n;
return (ISC_R_SUCCESS);
}
......@@ -1180,7 +1180,7 @@ uint16_tobuffer(isc_uint32_t value, isc_buffer_t *target) {
isc_region_t region;
if (value > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
isc_buffer_availableregion(target, &region);
if (region.length < 2)
return (ISC_R_NOSPACE);
......@@ -1193,7 +1193,7 @@ uint8_tobuffer(isc_uint32_t value, isc_buffer_t *target) {
isc_region_t region;
if (value > 0xff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
isc_buffer_availableregion(target, &region);
if (region.length < 1)
return (ISC_R_NOSPACE);
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: tsig_250.c,v 1.35 2000/05/13 22:50:49 tale Exp $ */
/* $Id: tsig_250.c,v 1.36 2000/05/15 21:14:18 tale Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
......@@ -58,7 +58,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0)
return (DNS_R_SYNTAX);
if ((sigtime >> 48) != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer((isc_uint16_t)(sigtime >> 32), target));
RETERR(uint32_tobuffer((isc_uint32_t)(sigtime & 0xffffffffU), target));
......@@ -67,7 +67,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
......@@ -75,7 +75,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
......@@ -88,7 +88,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
......@@ -96,7 +96,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
......@@ -104,7 +104,7 @@ fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: afsdb_18.c,v 1.26 2000/05/12 12:59:22 marka Exp $ */
/* $Id: afsdb_18.c,v 1.27 2000/05/15 21:14:20 tale Exp $ */
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
......@@ -39,13 +39,17 @@ fromtext_afsdb(dns_rdataclass_t rdclass, dns_rdatatype_t type,
REQUIRE(type == 18);
/* subtype */
/*
* Subtype.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/* hostname */
/*
* Hostname.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
dns_name_init(&name, NULL);
buffer_fromregion(&buffer, &token.value.as_region);
......@@ -109,8 +113,7 @@ fromwire_afsdb(dns_rdataclass_t rdclass, dns_rdatatype_t type,
}
static inline isc_result_t
towire_afsdb(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
{
towire_afsdb(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
isc_region_t tr;
isc_region_t sr;
dns_name_t name;
......@@ -133,8 +136,7 @@ towire_afsdb(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
}
static inline int
compare_afsdb(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
{
compare_afsdb(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
int result;
dns_name_t name1;
dns_name_t name2;
......@@ -178,8 +180,7 @@ fromstruct_afsdb(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
}
static inline isc_result_t
tostruct_afsdb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
{
tostruct_afsdb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
isc_region_t region;
dns_rdata_afsdb_t *afsdb = target;
dns_name_t name;
......@@ -207,8 +208,7 @@ tostruct_afsdb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
}
static inline void
freestruct_afsdb(void *source)
{
freestruct_afsdb(void *source) {
dns_rdata_afsdb_t *afsdb = source;
REQUIRE(source != NULL);
......@@ -239,8 +239,7 @@ additionaldata_afsdb(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
}
static inline isc_result_t
digest_afsdb(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
{
digest_afsdb(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
isc_region_t r1, r2;
dns_name_t name;
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: cert_37.c,v 1.26 2000/05/12 12:59:26 marka Exp $ */
/* $Id: cert_37.c,v 1.27 2000/05/15 21:14:21 tale Exp $ */
/* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */
......@@ -41,18 +41,24 @@ fromtext_cert(dns_rdataclass_t rdclass, dns_rdatatype_t type,
UNUSED(origin);
UNUSED(downcase);
/* cert type */
/*
* Cert type.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(dns_cert_fromtext(&cert, &token.value.as_textregion));
RETERR(uint16_tobuffer(cert, target));
/* key tag */
/*
* Key tag.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/* algorithm */
/*
* Algorithm.
*/
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
RETERR(dns_secalg_fromtext(&secalg, &token.value.as_textregion));
RETERR(mem_tobuffer(target, &secalg, 1));
......@@ -74,23 +80,31 @@ totext_cert(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
dns_rdata_toregion(rdata, &sr);
/* type */
/*
* Type.
*/
n = uint16_fromregion(&sr);
isc_region_consume(&sr, 2);
RETERR(dns_cert_totext((dns_cert_t)n, target));
RETERR(str_totext(" ", target));
/* key tag */
/*
* Key tag.
*/
n = uint16_fromregion(&sr);
isc_region_consume(&sr, 2);
sprintf(buf, "%u ", n);
RETERR(str_totext(buf, target));
/* algorithm */
/*
* Algorithm.
*/
RETERR(dns_secalg_totext(sr.base[0], target));
isc_region_consume(&sr, 1);
/* cert */
/*
* Cert.
*/
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(" (", target));
RETERR(str_totext(tctx->linebreak, target));
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: loc_29.c,v 1.18 2000/05/13 21:24:37 tale Exp $ */
/* $Id: loc_29.c,v 1.19 2000/05/15 21:14:22 tale Exp $ */
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
......@@ -74,7 +74,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 90)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
d1 = (int)token.value.as_ulong;
/*
* Minutes.
......@@ -88,9 +88,9 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0)
return (DNS_R_SYNTAX);
if (m1 < 0 || m1 > 59)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (d1 == 90 && m1 != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Seconds.
......@@ -104,7 +104,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.')
return (DNS_R_SYNTAX);
if (s1 < 0 || s1 > 59)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (*e == '.') {
e++;
for (i = 0; i < 3 ; i++) {
......@@ -122,7 +122,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
} else
s1 *= 1000;
if (d1 == 90 && s1 != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Direction.
......@@ -139,7 +139,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
*/
RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE));
if (token.value.as_ulong > 180)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
d2 = (int)token.value.as_ulong;
/*
......@@ -154,9 +154,9 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0)
return (DNS_R_SYNTAX);
if (m2 < 0 || m2 > 59)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (d2 == 180 && m2 != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Seconds.
......@@ -170,7 +170,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.')
return (DNS_R_SYNTAX);
if (s2 < 0 || s2 > 59)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (*e == '.') {
e++;
for (i = 0; i < 3 ; i++) {
......@@ -188,7 +188,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
} else
s2 *= 1000;
if (d2 == 180 && s2 != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Direction.
......@@ -208,7 +208,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.' && *e != 'm')
return (DNS_R_SYNTAX);
if (m < -100000 || m > 42849672)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
cm = 0;
if (*e == '.') {
e++;
......@@ -231,9 +231,9 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0)
return (DNS_R_SYNTAX);
if (m == -100000 && cm != 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
if (m == 42849672 && cm > 95)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Adjust base.
*/
......@@ -254,7 +254,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.' && *e != 'm')
return (DNS_R_SYNTAX);
if (m < 0 || m > 90000000)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
cm = 0;
if (*e == '.') {
e++;
......@@ -306,7 +306,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.' && *e != 'm')
return (DNS_R_SYNTAX);
if (m < 0 || m > 90000000)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
cm = 0;
if (*e == '.') {
e++;
......@@ -356,7 +356,7 @@ fromtext_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (*e != 0 && *e != '.' && *e != 'm')
return (DNS_R_SYNTAX);
if (m < 0 || m > 90000000)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
cm = 0;
if (*e == '.') {
e++;
......@@ -542,7 +542,7 @@ fromwire_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
c = sr.base[1];
if (c != 0)
if ((c&0xf) > 9 || ((c>>4)&0xf) > 9 || ((c>>4)&0xf) == 0)
return (DNS_R_RANGE);
return (ISC_R_RANGE);
/*
* Horizontal precision.
......@@ -550,7 +550,7 @@ fromwire_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
c = sr.base[2];