]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon/proxyv2: move PROXY protocol into its own layer
authorOto Šťáva <oto.stava@nic.cz>
Tue, 21 May 2024 17:04:38 +0000 (19:04 +0200)
committerOto Šťáva <oto.stava@nic.cz>
Tue, 4 Jun 2024 11:05:00 +0000 (13:05 +0200)
commitb475d004170fd4abe8b967b9f08f5c9472dbdbbb
tree8400774d0834059ab1c2d963d39c53d3c3fe07cc
parentdfe44a99c815609660a5bd9c16d5b1a34e20d2ff
daemon/proxyv2: move PROXY protocol into its own layer

Previously, PROXYv2 handling was partially implemented in the `io.c`
unit in the `_TCP` and `_UDP` protocol layers, which technically made
very little sense. This commit moves this handling into separate
`_PROXYV2_DGRAM` and `_PROXYV2_STREAM` protocol layers, basically
encapsulating the handling of proxies in the `proxyv2.c` unit.

This commit also makes the PROXYv2 stream layer only support
`PROTOLAYER_PAYLOAD_WIRE_BUF` on its input, as other payload types were
unused and untested in this context.
daemon/io.c
daemon/main.c
daemon/proxyv2.c
daemon/proxyv2.h
daemon/session2.c
daemon/session2.h