BUG/MINOR: stick-table: fix an incorrect 32 to 64 bit key conversion
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Oct 2019 04:21:05 +0000 (06:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Oct 2019 04:24:58 +0000 (06:24 +0200)
commit28c63c15f572a1afeabfdada6a0a4f4d023d05fc
tree59f9ea81ef8425862844cee5a4b7fbc4ab9cd4e2
parenteb46965bbb21291aab75ae88f033d9c9bab4a785
BUG/MINOR: stick-table: fix an incorrect 32 to 64 bit key conversion

As reported in issue #331, the code used to cast a 32-bit to a 64-bit
stick-table key is wrong. It only copies the 32 lower bits in place on
little endian machines or overwrites the 32 higher ones on big endian
machines. It ought to simply remove the wrong cast dereference.

This bug was introduced when changing stick table keys to samples in
1.6-dev4 by commit bc8c404449 ("MAJOR: stick-tables: use sample types
in place of dedicated types") so it the fix must be backported as far
as 1.6.
src/stick_table.c