]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: patterns: last fix was still not enough
authorThierry FOURNIER <tfournier@exceliance.fr>
Mon, 28 Apr 2014 09:18:57 +0000 (11:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 12:19:17 +0000 (14:19 +0200)
commite47e4e238542eb6c4bb635b315596198887e3cf3
tree8838a5792cebc3a0efab7bba0c51b3255a3a10b3
parenta631fc8de8786fee15c83b33aae81dabe3a5f1a3
BUG/MEDIUM: patterns: last fix was still not enough

Last fix did address the issue for inlined patterns, but it was not
enough because the flags are lost as well when updating patterns
dynamically over the CLI.

Also if the same file was used once with -i and another time without
-i, their references would have been merged and both would have used
the same matching method.

It's appear that the patterns have two types of flags. The first
ones are relative to the pattern matching, and the second are
relative to the pattern storage. The pattern matching flags are
the same for all the patterns of one expression. Now they are
stored in the expression. The storage flags are information
returned by the pattern mathing function. This information is
relative to each entry and is stored in the "struct pattern".

Now, the expression matching flags are forwarded to the parse
and index functions. These flags are stored during the
configuration parsing, and they are used during the parse and
index actions.

This issue was introduced in dev23 with the major pattern rework,
and is a continuation of commit a631fc8 ("BUG/MAJOR: patterns: -i
and -n are ignored for inlined patterns"). No backport is needed.
include/proto/pattern.h
include/types/acl.h
include/types/pattern.h
src/acl.c
src/dumpstats.c
src/map.c
src/pattern.c
src/proto_http.c