]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: proxy_protocol: Reserve TLV type 0x05 as PP2_TYPE_UNIQUE_ID
authorTim Duesterhus <tim@bastelstu.be>
Fri, 13 Mar 2020 11:34:22 +0000 (12:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2020 16:25:23 +0000 (17:25 +0100)
This reserves and defines TLV type 0x05.

doc/proxy-protocol.txt
include/types/connection.h

index 26f86a34535af6730cad3fcfd58de7291a20f6ee..fc1ca4a0445bba1e142885c4be116746fabaf9fc 100644 (file)
@@ -1,4 +1,4 @@
-2017/03/10                                                        Willy Tarreau
+2020/03/05                                                        Willy Tarreau
                                                            HAProxy Technologies
                                The PROXY protocol
                                  Versions 1 & 2
@@ -27,6 +27,7 @@ Revision history
                 reserved TLV type ranges, added TLV documentation, clarified
                 string encoding. With contributions from Andriy Palamarchuk
                 (Amazon.com).
+   2020/03/05 - added the unique ID TLV type (Tim Düsterhus)
 
 
 1. Background
@@ -538,6 +539,7 @@ The following types have already been registered for the <type> field :
         #define PP2_TYPE_AUTHORITY      0x02
         #define PP2_TYPE_CRC32C         0x03
         #define PP2_TYPE_NOOP           0x04
+        #define PP2_TYPE_UNIQUE_ID      0x05
         #define PP2_TYPE_SSL            0x20
         #define PP2_SUBTYPE_SSL_VERSION 0x21
         #define PP2_SUBTYPE_SSL_CN      0x22
@@ -602,7 +604,17 @@ bytes. Can be used for data padding or alignment. Note that it can be used
 to align only by 3 or more bytes because a TLV can not be smaller than that.
 
 
-2.2.5. The PP2_TYPE_SSL type and subtypes
+2.2.5. PP2_TYPE_UNIQUE_ID
+
+The value of the type PP2_TYPE_UNIQUE_ID is an opaque byte sequence of up to
+128 bytes generated by the upstream proxy that uniquely identifies the
+connection.
+
+The unique ID can be used to easily correlate connections across multiple
+layers of proxies, without needing to look up IP addresses and port numbers.
+
+
+2.2.6. The PP2_TYPE_SSL type and subtypes
 
 For the type PP2_TYPE_SSL, the value is itself a defined like this :
 
@@ -654,13 +666,13 @@ In all cases, the string representation (in UTF8) of the Common Name field
 using the TLV format and the type PP2_SUBTYPE_SSL_CN. E.g. "example.com".
 
 
-2.2.6. The PP2_TYPE_NETNS type
+2.2.7. The PP2_TYPE_NETNS type
 
 The type PP2_TYPE_NETNS defines the value as the US-ASCII string representation
 of the namespace's name.
 
 
-2.2.7. Reserved type ranges
+2.2.8. Reserved type ranges
 
 The following range of 16 type values is reserved for application-specific
 data and will be never used by the PROXY Protocol. If you need more values
index bfd6547ee7ac41cde86fb953a4dacedee24d8bab..0c2d960b95cf950de615e6e84fa09069c6188010 100644 (file)
@@ -558,6 +558,7 @@ struct proxy_hdr_v2 {
 #define PP2_TYPE_AUTHORITY      0x02
 #define PP2_TYPE_CRC32C         0x03
 #define PP2_TYPE_NOOP           0x04
+#define PP2_TYPE_UNIQUE_ID      0x05
 #define PP2_TYPE_SSL            0x20
 #define PP2_SUBTYPE_SSL_VERSION 0x21
 #define PP2_SUBTYPE_SSL_CN      0x22