>From the very first day of force-persist and ignore-persist features,
they only applied to backends, except that the documentation stated it
could also be applied to frontends.

In order to make it clear, the documentation is updated and the parser
will raise a warning if the keywords are used in a frontend section.

This patch should be backported up to the 1.5 branch.
---
 doc/configuration.txt | 8 ++++----
 src/cfgparse.c        | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/configuration.txt b/doc/configuration.txt
index a914c416c..992e18acc 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -2039,7 +2039,7 @@ errorloc                                  X          X    
     X         X
 errorloc302                               X          X         X         X
 -- keyword -------------------------- defaults - frontend - listen -- backend -
 errorloc303                               X          X         X         X
-force-persist                             -          X         X         X
+force-persist                             -          -         X         X
 filter                                    -          X         X         X
 fullconn                                  X          -         X         X
 grace                                     X          X         X         X
@@ -2052,7 +2052,7 @@ http-response                             -          X    
     X         X
 http-reuse                                X          -         X         X
 http-send-name-header                     -          -         X         X
 id                                        -          X         X         X
-ignore-persist                            -          X         X         X
+ignore-persist                            -          -         X         X
 load-server-state-from-file               X          -         X         X
 log                                  (*)  X          X         X         X
 log-format                                X          X         X         -
@@ -3503,7 +3503,7 @@ email-alert to <emailaddr>
 force-persist { if | unless } <condition>
   Declare a condition to force persistence on down servers
   May be used in sections:    defaults | frontend | listen | backend
-                                  no   |    yes   |   yes  |   yes
+                                  no   |    no    |   yes  |   yes
 
   By default, requests are not dispatched to down servers. It is possible to
   force this using "option persist", but it is unconditional and redispatches
@@ -4825,7 +4825,7 @@ id <value>
 ignore-persist { if | unless } <condition>
   Declare a condition to ignore persistence
   May be used in sections:    defaults | frontend | listen | backend
-                                  no   |    yes   |   yes  |   yes
+                                  no   |    no    |   yes  |   yes
 
   By default, when cookie persistence is enabled, every requests containing
   the cookie are unconditionally persistent (assuming the target server is up
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 27d7eee7b..c40e71dc7 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -4068,7 +4068,7 @@ int cfg_parse_listen(const char *file, int linenum, char 
**args, int kwm)
                        goto out;
                }
 
-               if (warnifnotcap(curproxy, PR_CAP_FE|PR_CAP_BE, file, linenum, 
args[0], NULL))
+               if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], 
NULL))
                        err_code |= ERR_WARN;
 
                if (strcmp(args[1], "if") != 0 && strcmp(args[1], "unless") != 
0) {
-- 
2.11.0


Reply via email to