diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-10-26 11:28:56 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-10-26 12:03:41 +0000 |
commit | 7f094a0d929476fcfe0104f3bf22b6689ef7eda7 (patch) | |
tree | aafb865f5c806978e57a9681bc0519e89d929f50 | |
parent | be21339e39078008b40f23450807f2a2f543bbb8 (diff) |
resolv.conf parsing: Treat unknown adns_af: values correctly
These shouldn't be fatal, and they should be affected by
ads->config_report_unknown.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | src/setup.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/setup.c b/src/setup.c index c52966d..7171f5b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -314,9 +314,11 @@ static void ccf_options(adns_state ads, const char *fn, else if (WORD_IS("ipv6")) ads->iflags |= adns_if_permit_ipv6; else { - configparseerr(ads,fn,lno, "option adns_af has bad value `%.*s' " - "(must be `any' or list {`ipv4',`ipv6'},...)", - (int)(endword-word), word); + if (ads->config_report_unknown) + adns__diag(ads,-1,0,"%s:%d: " + "option adns_af has bad value or entry `%.*s' " + "(option must be `any', or list of `ipv4',`ipv6')", + fn,lno, (int)(endword-word),word); break; } if (!comma) break; |