]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: peers: Do not emit global stick-table names.
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 20 Mar 2019 14:09:45 +0000 (15:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 May 2019 04:54:07 +0000 (06:54 +0200)
commit7fcc24d4efec8ee7c5dc0eb3df7b1368fc96035f
tree516cb9f97957cfedce0542553decec0ea5af022b
parentc02766a267cfd1a26d17b55469bd3cd762dc1532
MINOR: peers: Do not emit global stick-table names.

This commit "MINOR: stick-table: Add prefixes to stick-table names"
prepended the "peers" section name to stick-table names declared in such "peers"
sections followed by a '/' character.  This is not this name which must be sent
over the network to avoid collisions with stick-table name declared as backends.
As the '/' character is forbidden as first character of a backend name, we prefix
the stick-table names declared in peers sections only with a '/' character.
With such declarations:

    peers mypeers
       table t1

backend t1
   stick-table ... peers mypeers

at peer protocol level, "t1" declared as stick-table in "mypeers" section is different
of "t1" stick-table declared as backend.

In src/peers.c, only two modifications were required: use ->nid stktable struct
member in place of ->id in peer_prepare_switchmsg() to prepare the stick-table
definition messages. Same thing in peer_treat_definemsg() to treat a stick-table
definition messages.
src/cfgparse.c
src/peers.c