]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: tcp-act: avoid warning when set-mark / set-tos are not supported
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Jun 2021 05:12:22 +0000 (07:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Jun 2021 05:12:22 +0000 (07:12 +0200)
commit5bbfff107bb8b5bcb2d7985f0ec0769139c89235
tree57f619bed312f518ebd86a4bd9724044b05f15f1
parentf7f53afcf9d367d194edfb6dfdc378efbc641d69
BUILD: tcp-act: avoid warning when set-mark / set-tos are not supported

Since recent commit 469c06c30 ("MINOR: http-act/tcp-act: Add "set-mark"
and "set-tos" for tcp content rules") there's a build warning (or error)
on Windows due to static function tcp_action_set_mark() not being used
because the set-mark functionality is not supported there. It's caused
by the fact that only the parsing function uses it so if the code is
ifdefed out the function remains unused.

Let's surround it with ifdefs as well, and do the same for
tcp_action_set_tos() which could suffer the same fate on operating systems
not defining IP_TOS.

This may need to be backported if the patch above is backported. Also
be careful, the condition was adjusted to cover FreeBSD after commit
f7f53afcf ("BUILD/MEDIUM: tcp: set-mark setting support for FreeBSD.").
src/tcp_act.c