]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: lua: Store stick tables into the sample's `t` field
authorTim Duesterhus <tim@bastelstu.be>
Sun, 29 Sep 2019 21:03:09 +0000 (23:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 Sep 2019 02:11:36 +0000 (04:11 +0200)
This patch fixes issue #306.

This bug was introduced in the stick table refactoring in
1b8e68e89aadb2740d79034c217257a78e9747b9.

This fix must be backported to 2.0.

src/hlua.c

index bc6c7f767567c30bf8dd86b30acde04232e9768c..cefaf3801417958100ade92300eeb44508dbcb97 100644 (file)
@@ -713,8 +713,8 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
                        memcpy(trash.area, argp[idx].data.str.area,
                               argp[idx].data.str.data);
                        trash.area[argp[idx].data.str.data] = 0;
-                       argp[idx].data.prx = proxy_tbl_by_name(trash.area);
-                       if (!argp[idx].data.prx)
+                       argp[idx].data.t = stktable_find_by_name(trash.area);
+                       if (!argp[idx].data.t)
                                WILL_LJMP(luaL_argerror(L, first + idx, "table doesn't exist"));
                        argp[idx].type = ARGT_TAB;
                        break;