mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-05 06:22:04 -04:00
Fix parsing of unknown directives in resolv.conf
Only call eatline() to skip to the next line if we're not
already at the end of a line when parsing an unknown directive.
We were accidentally skipping the next line when there was only
a single unknown directive on the current line.
(cherry picked from commit eb78ad2080)
This commit is contained in:
parent
e6f773c84f
commit
722e6689f5
1 changed files with 5 additions and 3 deletions
|
|
@ -585,9 +585,11 @@ irs_resconf_load(isc_mem_t *mctx, const char *filename, irs_resconf_t **confp) {
|
|||
} else {
|
||||
/* unrecognised word. Ignore entire line */
|
||||
rval = ISC_R_SUCCESS;
|
||||
stopchar = eatline(fp);
|
||||
if (stopchar == EOF) {
|
||||
break;
|
||||
if (stopchar != '\n') {
|
||||
stopchar = eatline(fp);
|
||||
if (stopchar == EOF) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ret == ISC_R_SUCCESS && rval != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue