Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
6314cd33
Commit
6314cd33
authored
Nov 04, 1999
by
Mark Andrews
Browse files
Support $TTL w/ BIND 8 format
dns_ttl_fromtext() to return DNS_R_BADTTL not DNS_R_SYNTAX.
parent
ecda7175
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/dns/include/dns/ttl.h
View file @
6314cd33
...
...
@@ -66,7 +66,7 @@ dns_ttl_fromtext(isc_textregion_t *source, isc_uint32_t *ttl);
*
* Returns:
* DNS_R_SUCCESS
* DNS_R_
SYNTAX
* DNS_R_
BADTTL
*/
ISC_LANG_ENDDECLS
...
...
lib/dns/master.c
View file @
6314cd33
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: master.c,v 1.2
8
1999/11/0
2 13:07:51
marka Exp $ */
/* $Id: master.c,v 1.2
9
1999/11/0
4 01:21:27
marka Exp $ */
#include <config.h>
...
...
@@ -281,16 +281,12 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
finish_origin
=
ISC_TRUE
;
}
else
if
(
strcasecmp
(
token
.
value
.
as_pointer
,
"$TTL"
)
==
0
)
{
GETTOKEN
(
lex
,
ISC_LEXOPT_NUMBER
,
&
token
,
ISC_FALSE
);
if
(
token
.
type
!=
isc_tokentype_number
)
{
(
callbacks
->
warn
)(
callbacks
,
"dns_master_load: %s:%d $TTL expects number
\n
"
,
isc_lex_getsourcename
(
lex
),
isc_lex_getsourceline
(
lex
));
result
=
DNS_R_BADTTL
;
goto
cleanup
;
}
GETTOKEN
(
lex
,
0
,
&
token
,
ISC_FALSE
);
result
=
dns_ttl_fromtext
(
&
token
.
value
.
as_textregion
,
&
ttl
);
if
(
result
!=
DNS_R_SUCCESS
)
goto
cleanup
;
ttl
=
token
.
value
.
as_ulong
;
if
(
ttl
>
0x7fffffffUL
)
{
(
callbacks
->
warn
)(
callbacks
,
...
...
@@ -301,7 +297,6 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
ttl
=
0
;
}
default_ttl
=
ttl
;
ttl_known
=
ISC_TRUE
;
default_ttl_known
=
ISC_TRUE
;
read_till_eol
=
ISC_TRUE
;
continue
;
...
...
lib/dns/ttl.c
View file @
6314cd33
...
...
@@ -125,7 +125,12 @@ dns_counter_fromtext(isc_textregion_t *source, isc_uint32_t *ttl) {
dns_result_t
dns_ttl_fromtext
(
isc_textregion_t
*
source
,
isc_uint32_t
*
ttl
)
{
return
(
bind_ttl
(
source
,
ttl
));
dns_result_t
result
;
result
=
bind_ttl
(
source
,
ttl
);
if
(
result
!=
DNS_R_SUCCESS
)
result
=
DNS_R_BADTTL
;
return
(
result
);
}
static
dns_result_t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment