Skip to content
GitLab
Projects
Groups
Snippets
/
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
6657a9e2
Commit
6657a9e2
authored
Jan 05, 2006
by
Mark Andrews
Browse files
1957. [bug] Dig mishandled responses to class ANY queries.
[RT #15402]
parent
118394ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
6657a9e2
1957. [bug] Dig mishandled responses to class ANY queries.
[RT #15402]
1956. [bug] Improve cross compile support, 'gen' is now built
by native compiler. See README for additional
cross compile support information. [RT #15148]
...
...
lib/dns/include/dns/message.h
View file @
6657a9e2
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.h,v 1.11
6
200
5
/0
4/29 00:23:00
marka Exp $ */
/* $Id: message.h,v 1.11
7
200
6
/0
1/05 00:58:21
marka Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
...
...
@@ -712,6 +712,27 @@ dns_message_findtype(dns_name_t *name, dns_rdatatype_t type,
*\li #ISC_R_NOTFOUND -- the desired type does not exist.
*/
isc_result_t
dns_message_find
(
dns_name_t
*
name
,
dns_rdataclass_t
rdclass
,
dns_rdatatype_t
type
,
dns_rdatatype_t
covers
,
dns_rdataset_t
**
rdataset
);
/*%<
* Search the name for the specified rdclass and type. If it is found,
* *rdataset is filled in with a pointer to that rdataset.
*
* Requires:
*\li if '**rdataset' is non-NULL, *rdataset needs to be NULL.
*
*\li 'type' be a valid type, and NOT dns_rdatatype_any.
*
*\li If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
* Otherwise it should be 0.
*
* Returns:
*\li #ISC_R_SUCCESS -- all is well.
*\li #ISC_R_NOTFOUND -- the desired type does not exist.
*/
void
dns_message_movename
(
dns_message_t
*
msg
,
dns_name_t
*
name
,
dns_section_t
fromsection
,
...
...
lib/dns/message.c
View file @
6657a9e2
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.22
8
200
5/11/30 03:33:49
marka Exp $ */
/* $Id: message.c,v 1.22
9
200
6/01/05 00:58:21
marka Exp $ */
/*! \file */
...
...
@@ -802,6 +802,31 @@ findname(dns_name_t **foundname, dns_name_t *target,
return
(
ISC_R_NOTFOUND
);
}
isc_result_t
dns_message_find
(
dns_name_t
*
name
,
dns_rdataclass_t
rdclass
,
dns_rdatatype_t
type
,
dns_rdatatype_t
covers
,
dns_rdataset_t
**
rdataset
)
{
dns_rdataset_t
*
curr
;
if
(
rdataset
!=
NULL
)
{
REQUIRE
(
*
rdataset
==
NULL
);
}
for
(
curr
=
ISC_LIST_TAIL
(
name
->
list
);
curr
!=
NULL
;
curr
=
ISC_LIST_PREV
(
curr
,
link
))
{
if
(
curr
->
rdclass
==
rdclass
&&
curr
->
type
==
type
&&
curr
->
covers
==
covers
)
{
if
(
rdataset
!=
NULL
)
*
rdataset
=
curr
;
return
(
ISC_R_SUCCESS
);
}
}
return
(
ISC_R_NOTFOUND
);
}
isc_result_t
dns_message_findtype
(
dns_name_t
*
name
,
dns_rdatatype_t
type
,
dns_rdatatype_t
covers
,
dns_rdataset_t
**
rdataset
)
...
...
@@ -1033,7 +1058,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
/*
* Can't ask the same question twice.
*/
result
=
dns_message_find
type
(
name
,
rdtype
,
0
,
NULL
);
result
=
dns_message_find
(
name
,
rdclass
,
rdtype
,
0
,
NULL
);
if
(
result
==
ISC_R_SUCCESS
)
DO_FORMERR
;
...
...
@@ -1193,6 +1218,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
&&
rdtype
!=
dns_rdatatype_dnskey
/* in a TKEY query */
&&
rdtype
!=
dns_rdatatype_sig
/* SIG(0) */
&&
rdtype
!=
dns_rdatatype_tkey
/* Win2000 TKEY */
&&
msg
->
rdclass
!=
dns_rdataclass_any
&&
msg
->
rdclass
!=
rdclass
)
DO_FORMERR
;
...
...
@@ -1282,12 +1308,9 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
rdata
->
type
=
rdtype
;
rdata
->
flags
=
DNS_RDATA_UPDATE
;
result
=
ISC_R_SUCCESS
;
}
else
if
(
rdtype
==
dns_rdatatype_tsig
)
}
else
result
=
getrdata
(
source
,
msg
,
dctx
,
rdclass
,
rdtype
,
rdatalen
,
rdata
);
else
result
=
getrdata
(
source
,
msg
,
dctx
,
msg
->
rdclass
,
rdtype
,
rdatalen
,
rdata
);
if
(
result
!=
ISC_R_SUCCESS
)
goto
cleanup
;
rdata
->
rdclass
=
rdclass
;
...
...
@@ -1363,8 +1386,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
DO_FORMERR
;
rdataset
=
NULL
;
result
=
dns_message_find
type
(
name
,
rd
type
,
covers
,
&
rdataset
);
result
=
dns_message_find
(
name
,
rd
class
,
rdtype
,
covers
,
&
rdataset
);
}
/*
...
...
lib/dns/win32/libdns.def
View file @
6657a9e2
...
...
@@ -248,6 +248,7 @@ dns_message_checksig
dns_message_create
dns_message_currentname
dns_message_destroy
dns_message_find
dns_message_findname
dns_message_findtype
dns_message_firstname
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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