]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stktable: support optional index for array types in {set, clear, show} table...
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 19 Dec 2024 15:38:28 +0000 (16:38 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 23 Dec 2024 16:32:11 +0000 (17:32 +0100)
commite8b7337d860d5b959a56aac2191e432947d2a49b
tree647984afcb4bf5730ea92beace0715d8324f40f7
parentc0dc7769d49db93165283496409dc0a2230b420c
MINOR: stktable: support optional index for array types in {set, clear, show} table commands

As discussed in GH #2286, {set, clear, show} table commands were unable
to deal with array types such as gpt, because they handled such types as
a non-array types, thus only the first entry (ie: gpt[0]) was considered.

In this patch we add an extra logic around array-types handling so that
it is possible to specify an array index right after the type, like this:

  set table peer/table key mykey data.gpt[2] value
  # where 2 is the entry index that we want to access

If no index is specified, then it implicitly defaults to 0 to mimic
previous behavior.
doc/management.txt
src/stick_table.c