]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: peers: forget the remote table when ignoring an unknown key type
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 23 Oct 2026 16:18:36 +0000 (18:18 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 26 Oct 2026 10:39:42 +0000 (11:39 +0100)
commit4e9ff0e608ab4a3c21cbe59d2e3e667bdd96e0e2
treea4cff64b1f5b7a828190029bfc48535c296772e7
parenteaeeb9e9a49dcb53e340dd8d71fc3bc12c823c59
BUG/MINOR: peers: forget the remote table when ignoring an unknown key type

Commit 1696cfaa1 ("BUG/MEDIUM: peers: enforce check on incoming table key
type") makes peer_treat_definemsg() ignore a table definition with an
unknown key type. But contrary to all other paths ignoring a definition,
it leaves p->remote_table set to the local table matched by name. The
update messages which follow are thus not ignored but decoded using the
local table's key type and applied to it, while they were built for a
different key type. This is precisely the situation the commit wanted to
cover (a newer peer supporting new key types).

Let's reset p->remote_table as the other paths do.

HAProxy never emits such a value: peer_net_key_type[] only covers the five
supported key types, so a compliant peer stays below PEER_KT_TYPES. This is
therefore latent today, and becomes reachable the day a new key type is
added, when a newer peer talks to an older one in a mixed-version cluster.

This must be backported to all stable versions.
src/peers.c