mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
MINOR: update proxy-protocol-v2 #define
Report #define from doc/proxy-protocol.txt.
This commit is contained in:
parent
9679ac997a
commit
58118b43b1
@ -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 {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user