From: Emeric Brun Date: Thu, 3 Apr 2025 08:29:16 +0000 (+0200) Subject: BUG/MINOR: peers: fix expire learned from a peer not converted from ms to ticks X-Git-Tag: v3.2-dev10~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00461fbfbfd19e93af621658abcf7d1205f44182;p=thirdparty%2Fhaproxy.git BUG/MINOR: peers: fix expire learned from a peer not converted from ms to ticks This is has now impact currently since MS_TO_TICKS macro does nothing but it will prevent further bugs. --- diff --git a/src/peers.c b/src/peers.c index f6001b1a3..e4ac52b22 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1740,6 +1740,8 @@ static int peer_treat_updatemsg(struct appctx *appctx, struct peer *p, int updt, memcpy(&expire, *msg_cur, expire_sz); *msg_cur += expire_sz; expire = ntohl(expire); + /* the rest of the code considers expire as ticks and not MS */ + expire = MS_TO_TICKS(expire); } newts = stksess_new(table, NULL);