From: Frederic Lecaille Date: Fri, 23 Oct 2026 16:18:36 +0000 (+0200) Subject: BUG/MINOR: peers: forget the remote table when ignoring an unknown key type X-Git-Tag: v3.5-dev10~43 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=4e9ff0e608ab4a3c21cbe59d2e3e667bdd96e0e2;p=haproxy.git 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. --- diff --git a/src/peers.c b/src/peers.c index 4fffcf352..64fdfdd9c 100644 --- a/src/peers.c +++ b/src/peers.c @@ -2412,6 +2412,7 @@ static inline int peer_treat_definemsg(struct appctx *appctx, struct peer *p, } if (table_type < 0 || table_type >= PEER_KT_TYPES) { + p->remote_table = NULL; TRACE_PROTO("ignore table definition message: unknown table type", PEERS_EV_SESS_IO|PEERS_EV_RX_MSG|PEERS_EV_PROTO_DEF, appctx, p); goto ignore_msg; }