]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse: Space allocation for "server_name" stick-table data type.
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 17 May 2019 08:12:52 +0000 (10:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Jun 2019 06:33:35 +0000 (08:33 +0200)
When parsing sticking rules, with this patch we reserve some room for the new
"server_name" stick-table data type, as this is already done for "server_id",
setting the offset and used space (in bytes) in the stick-table entry thanks
to stkable_alloc_data_type().

src/cfgparse.c

index 8c8ac04a27e4f5306dfb96825a7d0909764d2744..5b5941322d7740f3306beff5cc912b03590ab1fe 100644 (file)
@@ -2715,6 +2715,7 @@ int check_config_validity()
                                free((void *)mrule->table.name);
                                mrule->table.t = target;
                                stktable_alloc_data_type(target, STKTABLE_DT_SERVER_ID, NULL);
+                               stktable_alloc_data_type(target, STKTABLE_DT_SERVER_NAME, NULL);
                        }
                }
 
@@ -2748,6 +2749,7 @@ int check_config_validity()
                                free((void *)mrule->table.name);
                                mrule->table.t = target;
                                stktable_alloc_data_type(target, STKTABLE_DT_SERVER_ID, NULL);
+                               stktable_alloc_data_type(target, STKTABLE_DT_SERVER_NAME, NULL);
                        }
                }