Commit 2103b1d4 authored by Brian Wellington's avatar Brian Wellington
Browse files

Don't allow queries of class or type ANY.

parent 10e6498d
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment