Commit 3d247992 authored by Mark Andrews's avatar Mark Andrews
Browse files

1866. [bug] resolv.conf parse errors were being ignored by

                        dig/host/nslookup. [RT #14841]

1865.   [bug]           Silently ignore nameservers in /etc/resolv.conf with
                        bad addresses. [RT #14841]
parent 116e6b42
......@@ -10,9 +10,11 @@
1867. [bug] It was possible to trigger a INSIST in
dlv_validatezonekey(). [RT #14846]
1866. [placeholder] rt14841
1866. [bug] resolv.conf parse errors were being ignored by
dig/host/nslookup. [RT #14841]
1865. [placeholder] rt14841
1865. [bug] Silently ignore nameservers in /etc/resolv.conf with
bad addresses. [RT #14841]
1864. [placeholder] rt14802
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.277 2005/06/07 00:15:58 marka Exp $ */
/* $Id: dighost.c,v 1.278 2005/06/07 00:59:59 marka Exp $ */
/*! \file
* \note
......@@ -948,7 +948,10 @@ setup_system(void) {
if (lwresult != LWRES_R_SUCCESS)
fatal("lwres_context_create failed");
(void)lwres_conf_parse(lwctx, RESOLV_CONF);
lwresult = lwres_conf_parse(lwctx, RESOLV_CONF);
if (lwresult != LWRES_R_SUCCESS)
fatal("parse of %s failed", RESOLV_CONF);
lwconf = lwres_conf_get(lwctx);
/* Make the search list */
......
......@@ -41,7 +41,7 @@ rt14801 review
rt14802 new
rt14814 review
rt14815 open marka
rt14841 new
rt14841 closed
rt14846 closed
rt14851 closed
rt14855 new
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwconfig.c,v 1.41 2005/04/29 00:24:06 marka Exp $ */
/* $Id: lwconfig.c,v 1.42 2005/06/07 01:00:00 marka Exp $ */
/*! \file */
......@@ -296,6 +296,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
char word[LWRES_CONFMAXLINELEN];
int res;
lwres_conf_t *confdata;
lwres_addr_t address;
confdata = &ctx->confdata;
......@@ -311,10 +312,9 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
if (res != EOF && res != '\n')
return (LWRES_R_FAILURE); /* Extra junk on line. */
res = lwres_create_addr(word,
&confdata->nameservers[confdata->nsnext++], 1);
if (res != LWRES_R_SUCCESS)
return (res);
res = lwres_create_addr(word, &address, 1);
if (res == LWRES_R_SUCCESS)
confdata->nameservers[confdata->nsnext++] = address;
return (LWRES_R_SUCCESS);
}
......
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