diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:47:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:47:26 +0000 |
commit | 992e0eab5e29263472e54799eea6db31cf565abd (patch) | |
tree | 28e6ba94154a67ce40063faef66343917fbadd4e /daemon/proxyv2.h | |
parent | Releasing progress-linux version 5.7.1-1~progress7.99u1. (diff) | |
download | knot-resolver-992e0eab5e29263472e54799eea6db31cf565abd.tar.xz knot-resolver-992e0eab5e29263472e54799eea6db31cf565abd.zip |
Merging upstream version 5.7.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | daemon/proxyv2.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/daemon/proxyv2.h b/daemon/proxyv2.h index 2d57744..fdee126 100644 --- a/daemon/proxyv2.h +++ b/daemon/proxyv2.h @@ -6,10 +6,11 @@ #include <stdint.h> -#include "daemon/session.h" -#include "daemon/network.h" #include "lib/utils.h" +struct network; +struct session; + extern const char PROXY2_SIGNATURE[12]; #define PROXY2_MIN_SIZE 16 @@ -21,14 +22,20 @@ enum proxy2_command { /** Parsed result of the PROXY protocol */ struct proxy_result { - enum proxy2_command command; /**< Proxy command - PROXY or LOCAL. */ - int family; /**< Address family from netinet library (e.g. AF_INET6). */ - int protocol; /**< Protocol type from socket library (e.g. SOCK_STREAM). */ - union kr_sockaddr src_addr; /**< Parsed source address and port. */ - union kr_sockaddr dst_addr; /**< Parsed destination address and port. */ - bool has_tls : 1; /**< `true` = client has used TLS with the proxy. - If TLS padding is enabled, it will be used even if - the proxy did not use TLS with kresd. */ + /** Proxy command - PROXY or LOCAL. */ + enum proxy2_command command; + /** Address family from netinet library (e.g. AF_INET6). */ + int family; + /** Protocol type from socket library (e.g. SOCK_STREAM). */ + int protocol; + /** Parsed source address and port. */ + union kr_sockaddr src_addr; + /** Parsed destination address and port. */ + union kr_sockaddr dst_addr; + /** `true` = client has used TLS with the proxy. If TLS padding is + * enabled, it will be used even if the communication between kresd and + * the proxy is unencrypted. */ + bool has_tls : 1; }; /** Checks for a PROXY protocol version 2 signature in the specified buffer. */ |