]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ncbuf: define various insertion modes
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 9 May 2022 09:59:15 +0000 (11:59 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 12 May 2022 16:27:05 +0000 (18:27 +0200)
commitb830f0d8d9956581fb46c041ba05975ef8680d34
tree9d154769e7c4e90905ff9abae537a0ca5f454c78
parent077e096b30095924e7706ffdfbe301827a7ccdb6
MINOR: ncbuf: define various insertion modes

Define three different ways to proceed insertion. This configures how
overlapping data is treated.
- NCB_ADD_PRESERVE : in this mode, old data are kept during insertion.
- NCB_ADD_OVERWRT : new data will overwrite old ones.
- NCB_ADD_COMPARE : this mode adds a new test in check stage. The
  overlapping old and new data must be identical or else the insertion
  is not conducted. An error NCB_RET_DATA_REJ is used in this case.

The mode is specified with a new argument to ncb_add() function.
include/haproxy/ncbuf-t.h
include/haproxy/ncbuf.h
src/ncbuf.c