]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MAJOR: spoe: upgrade the SPOP version to 2.0 and remove the support for 1.0
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 31 May 2018 12:56:42 +0000 (14:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jun 2018 15:33:48 +0000 (17:33 +0200)
The commit c4dcaff3 ("BUG/MEDIUM: spoe: Flags are not encoded in network order")
introduced an incompatibility with older agents. So the major version of the
SPOP is increased to make the situation unambiguous. And because before the fix,
the protocol is buggy, the support of the version 1.0 is removed to be sure to
not continue to support buggy agents.

The agents in the contrib folder (spoa_example, modsecurity and mod_defender)
are also updated to announce the SPOP version 2.0.

So, to be clear, from the patch, connections to agents announcing the SPOP
version 1.0 will be rejected.

This patch must be backported in 1.8.

contrib/mod_defender/spoa.c
contrib/modsecurity/spoa.c
contrib/spoa_example/spoa.c
src/flt_spoe.c

index 1191260a472b6e9674b9e74a7ab929769c6bb762..34b24f4912336617d4a51416e77bd0fee661a18f 100644 (file)
@@ -43,7 +43,7 @@
 #define CONNECTION_BACKLOG 10
 #define NUM_WORKERS        10
 #define MAX_FRAME_SIZE     16384
-#define SPOP_VERSION       "1.0"
+#define SPOP_VERSION       "2.0"
 
 #define SLEN(str) (sizeof(str)-1)
 
index cbabcb29c303c002b2053e458e7a76f27a56055a..18ef1d2454a1a14d5b33b689e83bdcdc3071a8c5 100644 (file)
@@ -48,7 +48,7 @@
 #define CONNECTION_BACKLOG 10
 #define NUM_WORKERS        10
 #define MAX_FRAME_SIZE     16384
-#define SPOP_VERSION       "1.0"
+#define SPOP_VERSION       "2.0"
 
 #define SLEN(str) (sizeof(str)-1)
 
index 71a36f0720fe2adc981e071989efae3cda9ee22e..d7486a417aa5d96dda114ece2dda464173f3425d 100644 (file)
@@ -43,7 +43,7 @@
 #define CONNECTION_BACKLOG 10
 #define NUM_WORKERS        10
 #define MAX_FRAME_SIZE     16384
-#define SPOP_VERSION       "1.0"
+#define SPOP_VERSION       "2.0"
 
 #define SLEN(str) (sizeof(str)-1)
 
index 7a19a18a7ae7fdc9f25125339848008534b0f081..d1323ae3e9bfe084efda2677a3b9a8e88dc87d22 100644 (file)
@@ -314,12 +314,13 @@ struct spoe_version {
 
 /* All supported versions */
 static struct spoe_version supported_versions[] = {
-       {"1.0", 1000, 1000},
+       /* 1.0 is now unsupported because of a bug about frame's flags*/
+       {"2.0", 2000, 2000},
        {NULL,  0, 0}
 };
 
 /* Comma-separated list of supported versions */
-#define SUPPORTED_VERSIONS_VAL  "1.0"
+#define SUPPORTED_VERSIONS_VAL  "2.0"
 
 /* Convert a string to a SPOE version value. The string must follow the format
  * "MAJOR.MINOR". It will be concerted into the integer (1000 * MAJOR + MINOR).