From: Willy Tarreau Date: Thu, 9 Jul 2015 09:39:33 +0000 (+0200) Subject: MINOR: args: add new context for servers X-Git-Tag: v1.6-dev3~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28d976d5eedab0c7aa9abb6e38501c2bf27578f6;p=thirdparty%2Fhaproxy.git MINOR: args: add new context for servers We'll have to support fetch expressions and args on server lines for "usesrc", "usedst", "sni", etc... --- diff --git a/include/types/arg.h b/include/types/arg.h index cccc5655e9..c38d9d68ff 100644 --- a/include/types/arg.h +++ b/include/types/arg.h @@ -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 */ diff --git a/src/log.c b/src/log.c index eac62a0298..ffd8f10dae 100644 --- 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 */ } diff --git a/src/sample.c b/src/sample.c index 330f08a53c..6088869b50 100644 --- a/src/sample.c +++ b/src/sample.c @@ -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 */