2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Don't allow queries of class or type ANY.

This commit is contained in:
Brian Wellington
2000-12-13 00:22:54 +00:00
parent 10e6498d6d
commit 2103b1d460

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getrrset.c,v 1.3 2000/11/28 01:50:46 gson Exp $ */
/* $Id: getrrset.c,v 1.4 2000/12/13 00:22:54 bwelling Exp $ */
#include <config.h>
@@ -87,6 +87,14 @@ lwres_getrrsetbyname(const char *hostname, unsigned int rdclass,
goto fail;
}
/*
* Don't allow queries of class or type ANY
*/
if (rdclass == 0xff || rdtype == 0xff) {
result = ERRSET_INVAL;
goto fail;
}
lwresult = lwres_context_create(&lwrctx, NULL, NULL, NULL, 0);
if (lwresult != LWRES_R_SUCCESS) {
result = lwresult_to_result(lwresult);