]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: peers: same table updates re-pushed after a re-connect
authorEmeric Brun <ebrun@haproxy.com>
Tue, 22 Sep 2015 13:34:19 +0000 (15:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2015 14:07:32 +0000 (16:07 +0200)
Some updates are pushed using an incremental update message after a
re-connection whereas the origin is forgotten by the peer.
These updates are never correctly acknowledged. So they are regularly
re-pushed after an idle timeout and a re-connect.

The fix consists to use an absolute update message in some cases.

src/peers.c

index a40591831f6ceb46ba838aee948083531d4a6bac..be701a8631fff83a821bb52e5c3a15a800840457 100644 (file)
@@ -250,8 +250,8 @@ static int peer_prepare_updatemsg(struct stksess *ts, struct shared_table *st, c
        /* construct message */
 
        /* check if we need to send the update identifer */
-       if (st->last_pushed && ts->upd.key > st->last_pushed && (ts->upd.key - st->last_pushed) == 1) {
-               use_identifier = 0;
+       if (!st->last_pushed || ts->upd.key < st->last_pushed || ((ts->upd.key - st->last_pushed) != 1)) {
+               use_identifier = 1;
        }
 
        /* encode update identifier if needed */