]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: fix missing "log-format overrides previous 'option tcplog clf'..." detection
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 17 Sep 2024 12:24:05 +0000 (14:24 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 17 Sep 2024 12:41:58 +0000 (14:41 +0200)
In commit fd48b28315 ("MINOR: Implements new log format of option tcplog clf")
"option tcplog clf" detection was correcly added for "option tcplog" and
"option httplog", but "log-format" case was overlooked. Thus, this config
would report erroneous warning message:

  defaults
    option tcplog clf
    log-format "ok"

[WARNING]  (727893) : config : parsing [test.conf:3]: 'log-format' overrides previous 'log-format' in 'defaults' section.

No backport needed unless fd48b28315 is.

src/cfgparse-listen.c

index 0c59549f15f61f5f559f99ddeadb0302d1722093..876a5da95b09de2d483c951f350ec5709a787d97 100644 (file)
@@ -2699,6 +2699,8 @@ stats_error_parsing:
                                oldlogformat = "option httplog";
                        else if (curproxy->logformat.str == default_tcp_log_format)
                                oldlogformat = "option tcplog";
+                       else if (curproxy->logformat.str == clf_tcp_log_format)
+                               oldlogformat = "option tcplog clf";
                        else if (curproxy->logformat.str == clf_http_log_format)
                                oldlogformat = "option httplog clf";
                        else if (curproxy->logformat.str == default_https_log_format)