]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: Make SRV_STATE_LINE_MAXLEN value from 512 to 2kB (2000 bytes).
authorvigneshsp <vickycena94@outlook.com>
Mon, 9 May 2022 17:06:39 +0000 (22:36 +0530)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 May 2022 09:39:06 +0000 (11:39 +0200)
The statefile before this patch can only parse lines within 512
characters, now as we made the value to 2000, it can support a
line of length of 2kB.

This patch fixes GitHub issue #1530.
It should be backported to all stable releases.

include/haproxy/server-t.h

index e53d6121b422f0edcb5e84665205fccc9da41111..88302ca269a61b6fdbb5aa5e5ce7f858001d80c0 100644 (file)
@@ -132,7 +132,7 @@ enum srv_initaddr {
 #define SRV_STATE_FILE_MAX_FIELDS 25
 #define SRV_STATE_FILE_MIN_FIELDS_VERSION_1 20
 #define SRV_STATE_FILE_MAX_FIELDS_VERSION_1 25
-#define SRV_STATE_LINE_MAXLEN 512
+#define SRV_STATE_LINE_MAXLEN 2000
 
 /* server flags -- 32 bits */
 #define SRV_F_BACKUP       0x0001        /* this server is a backup server */