From 7a91a0e1e52552b0c90506b9e5da1eceb9f23a38 Mon Sep 17 00:00:00 2001 From: Pieter Baauw Date: Sat, 13 Feb 2016 15:51:58 +0100 Subject: [PATCH] MEDIUM: cfgparse: reject incorrect 'timeout retry' keyword spelling in resolvers If for example it was written as 'timeout retri 1s' or 'timeout wrong 1s' this would be used for the retry timeout value. Resolvers section only timeout setting currently is 'retry', others are still parsed as before this patch to not break existing configurations. A less strict version will be backported to 1.6. --- src/cfgparse.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index d44f57a..99e97c7 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2438,23 +2438,37 @@ int cfg_parse_resolvers(const char *file, int linenum, char **args, int kwm) curr_resolvers->resolve_retries = atoi(args[1]); } else if (strcmp(args[0], "timeout") == 0) { - const char *res; - unsigned int timeout_retry; - - if (!*args[2]) { + if (!*args[1]) { Alert("parsing [%s:%d] : '%s' expects 'retry' and