BUG/MINOR: halog: exit with error when some output filters are set simultaneosly
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 16 Jul 2025 12:35:28 +0000 (14:35 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Aug 2025 06:38:58 +0000 (08:38 +0200)
commit8fc62dbff10a674cdd673d319b61a6aa0ab01b4a
tree8f3e9010cc9790ffc01d59fc79abd24689920267
parent0b854dfaf028a8836e3e460738370ef7210f1854
BUG/MINOR: halog: exit with error when some output filters are set simultaneosly

Exit with an error if multiple output filters (-ic, -srv, -st, -tc, -u*, etc.)
are used at the same time.

halog is designed to process and display output for only one filter at a time.
Using multiple filters simultaneously can cause a crash because the program is
not designed to manage multiple, separate result sets (e.g., one for
IP counts, another for URLs).

Supporting simultaneous filters would require a redesign to collect entries for
each filter in separate ebtree. This would negatively impact performance and is
not requested for the moment. This patch prevents the crash by checking filter
combinations just after the command line parsing.

This issue was reported in GitHUB #3031.
This should be backported in all stable versions.

(cherry picked from commit 254e4d59f75784c237e0c51596c6e0ca8730e717)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit dd276c752d5edfe26778ded9006dea40d5e33d23)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
admin/halog/halog.c