]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stick-table: Add prefixes to stick-table names.
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 20 Mar 2019 14:06:55 +0000 (15:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 May 2019 04:54:07 +0000 (06:54 +0200)
commitc02766a267cfd1a26d17b55469bd3cd762dc1532
treedc88a1b5290d6b4e4b78f7d75481289b484c804d
parent015e4d7d93a2a34e79bd08e832046708e5d37f1e
MINOR: stick-table: Add prefixes to stick-table names.

With this patch we add a prefix to stick-table names declared in "peers" sections
concatenating the "peers" section name followed by a '/' character with
the stick-table name. Consequently, "peers" sections have their own
namespace for their stick-tables. Obviously, these stick-table names are not the
ones which should be sent over the network. So these configurations must be
compatible and should make A and B peers communicate with peers protocol:

    # haproxy A config, old way stick-table declerations
    peers mypeers
        peer A ...
        peer B ...

    backend t1
        stick-table type string size 10m store gpc0 peers mypeers

    # haproxy B config, new way stick-table declerations
    peers mypeers
        peer A ...
        peer B ...
        table t1 type string size store gpc0 10m

This "network" name is stored in ->nid new field of stktable struct. The "local"
stktable-name is still stored in ->id.
include/proto/stick_table.h
include/types/stick_table.h
src/cfgparse-listen.c
src/cfgparse.c
src/stick_table.c