From: Wouter Wijngaards Date: Mon, 9 Apr 2018 10:42:48 +0000 (+0000) Subject: - Accept both option names with and without colon for get_option X-Git-Tag: release-1.7.1rc1~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbee729c5bbd366adca86b929f875a25336d428e;p=thirdparty%2Funbound.git - Accept both option names with and without colon for get_option and set_option. git-svn-id: file:///svn/unbound/trunk@4611 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 2480d1394..d0536ac9b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,8 @@ - num.query.authzone.up and num.query.authzone.down statistics counters. - Fix downstream auth zone, only fallback when auth zone fails to answer and fallback is enabled. + - Accept both option names with and without colon for get_option + and set_option. 5 April 2018: Wouter - Combine write of tcp length and tcp query for dns over tls. diff --git a/util/config_file.c b/util/config_file.c index c2cbe8121..8ca803c8f 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -386,6 +386,12 @@ struct config_file* config_create_forlib(void) int config_set_option(struct config_file* cfg, const char* opt, const char* val) { + char buf[64]; + if(!opt) return 0; + if(opt[strlen(opt)-1] != ':' && strlen(opt)+2