]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: args: add new context for servers
authorWilly Tarreau <w@1wt.eu>
Thu, 9 Jul 2015 09:39:33 +0000 (11:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 9 Jul 2015 09:39:33 +0000 (11:39 +0200)
We'll have to support fetch expressions and args on server lines for
"usesrc", "usedst", "sni", etc...

include/types/arg.h
src/log.c
src/sample.c

index cccc5655e96e44a938021b07e684164094c9c1d5..c38d9d68ff8520c8779ea791e7769322ee96a00b 100644 (file)
@@ -74,6 +74,7 @@ enum {
        ARGC_UIF,      /* unique-id-format */
        ARGC_RDR,      /* redirect */
        ARGC_CAP,      /* capture rule */
+       ARGC_SRV,      /* server line */
 };
 
 /* flags used when compiling and executing regex */
index eac62a02989900e33412ae303e61b537d459bcf0..ffd8f10dae4e7b0580ade5fda2ff1a7c7fd504dd 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -192,6 +192,8 @@ static inline const char *fmt_directive(const struct proxy *curproxy)
                return "redirect";
        case ARGC_CAP:
                return "capture";
+       case ARGC_SRV:
+               return "server";
        default:
                return "undefined(please report this bug)"; /* must never happen */
        }
index 330f08a53ce832faff708dd1f690b73bb6b3e023..6088869b50fad3bd65cc627114882fd8692338ed 100644 (file)
@@ -1125,6 +1125,7 @@ int smp_resolve_args(struct proxy *p)
                case ARGC_RDR: where = "in redirect format string in"; break;
                case ARGC_CAP: where = "in capture rule in"; break;
                case ARGC_ACL: ctx = "ACL keyword"; break;
+               case ARGC_SRV: where = "in server directive in"; break;
                }
 
                /* set a few default settings */