]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: update proxy-protocol-v2 #define
authorEmmanuel Hocdet <manu@gandi.net>
Fri, 13 Oct 2017 10:15:28 +0000 (12:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 Oct 2017 17:32:36 +0000 (19:32 +0200)
Report #define from doc/proxy-protocol.txt.

include/types/connection.h
src/connection.c

index 1c923c5784cdb58cb7ac654eacbe6c96aa92c2fb..eee75ec42ec9b10f65e6be29858ef8be7e664b95 100644 (file)
@@ -373,10 +373,17 @@ struct proxy_hdr_v2 {
        } addr;
 };
 
-#define PP2_TYPE_SSL           0x20
-#define PP2_TYPE_SSL_VERSION   0x21
-#define PP2_TYPE_SSL_CN        0x22
-#define PP2_TYPE_NETNS         0x30
+#define PP2_TYPE_ALPN           0x01
+#define PP2_TYPE_AUTHORITY      0x02
+#define PP2_TYPE_CRC32C         0x03
+#define PP2_TYPE_NOOP           0x04
+#define PP2_TYPE_SSL            0x20
+#define PP2_SUBTYPE_SSL_VERSION 0x21
+#define PP2_SUBTYPE_SSL_CN      0x22
+#define PP2_SUBTYPE_SSL_CIPHER  0x23
+#define PP2_SUBTYPE_SSL_SIG_ALG 0x24
+#define PP2_SUBTYPE_SSL_KEY_ALG 0x25
+#define PP2_TYPE_NETNS          0x30
 
 #define TLV_HEADER_SIZE      3
 struct tlv {
index 48f0ec33158784a87d2dd4e0127ad2e0f76baaff..a29bc2c327959804388c402394d7cda4e10e53f2 100644 (file)
@@ -1037,7 +1037,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
                        tlv->client |= PP2_CLIENT_SSL;
                        value = ssl_sock_get_version(remote);
                        if (value) {
-                               ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len-ret-ssl_tlv_len), PP2_TYPE_SSL_VERSION, strlen(value), value);
+                               ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len-ret-ssl_tlv_len), PP2_SUBTYPE_SSL_VERSION, strlen(value), value);
                        }
                        if (ssl_sock_get_cert_used_sess(remote)) {
                                tlv->client |= PP2_CLIENT_CERT_SESS;
@@ -1048,7 +1048,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
                        if (srv->pp_opts & SRV_PP_V2_SSL_CN) {
                                cn_trash = get_trash_chunk();
                                if (ssl_sock_get_remote_common_name(remote, cn_trash) > 0) {
-                                       ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len - ret - ssl_tlv_len), PP2_TYPE_SSL_CN, cn_trash->len, cn_trash->str);
+                                       ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len - ret - ssl_tlv_len), PP2_SUBTYPE_SSL_CN, cn_trash->len, cn_trash->str);
                                }
                        }
                }