Willy Tarreau b4ff6f4ae9 BUG/MEDIUM: peers: properly skip conn_cur from incoming messages
The approach used for skipping conn_cur in commit db2ab8218 ("MEDIUM:
stick-table: never learn the "conn_cur" value from peers") was wrong,
it only works with simple tables but as soon as frequency counters or
arrays are exchanged after conn_cur, the stream is desynchronized and
incorrect values are read. This is because the fields have a variable
length depending on their types and cannot simply be skipped by a
"continue" statement.

Let's change the approach to make sure we continue to completely parse
these local-only fields, and only drop the value at the moment we're
about to store them, since this is exactly the intent.

A simpler approach could consist in having two sets of stktable_data_ptr()
functions, one for retrieval and one for storage, and to make the store
function return a NULL pointer for local types. For now this doesn't
seem worth the trouble.

This fixes github issue #1497. Thanks to @brenc for the reproducer.

This must be backported to 2.5.
2021-12-24 13:48:39 +01:00
..
2021-11-05 07:48:38 +01:00
2021-05-08 12:29:51 +02:00
2021-09-17 17:22:05 +02:00
2021-11-08 12:08:26 +01:00
2021-11-08 08:05:39 +01:00
2021-11-08 12:08:26 +01:00
2021-11-08 12:08:26 +01:00
2021-11-08 08:05:39 +01:00
2021-11-05 07:48:38 +01:00
2021-11-08 12:08:26 +01:00
2021-09-23 15:27:25 +02:00
2021-11-08 12:08:26 +01:00