]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: do not sum squares of differences for word fingerprints
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Mar 2021 08:44:53 +0000 (09:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Mar 2021 08:44:53 +0000 (09:44 +0100)
commit714c4c14d1cde8a9027c9806f74821b08f8a03ad
tree0ced43daae4fc89ae1f46e78e11fb4fd7cc1abbf
parent9294e8822f6f359ea9dba6f19b97fb75a72c433e
MINOR: tools: do not sum squares of differences for word fingerprints

While sums of squares usually give excellent results in fixed-sise
patterns, they don't work well to compare different sized ones such
as when some sub-words are missing, because a word such as "server"
contains "er" twice, which will rsult in an extra distance of at
least 4 for just this e->r transition compared to another one missing
it. This is one of the main reasons why "show conn" only proposes
"show info" on the CLI. Maybe an improved approach consisting in
using squares only for exact same lengths would work, but it would
still make it difficult to spot reversed characters.
src/tools.c