#include <common/regex.h>
#include <common/tools.h>
+#include <types/acl.h>
#include <types/buffers.h>
#include <types/httperr.h>
#include <types/session.h>
struct proxy *be; /* default backend, or NULL if none set */
char *name; /* default backend name during config parse */
} defbe;
+ struct list acl; /* ACL declared on this proxy */
struct server *srv; /* known servers */
int srv_act, srv_bck; /* # of running servers */
int tot_wact, tot_wbck; /* total weights of active and backup servers */
#include <types/proxy.h>
#include <types/queue.h>
+#include <proto/acl.h>
#include <proto/backend.h>
#include <proto/buffers.h>
#include <proto/checks.h>
curproxy->next = proxy;
proxy = curproxy;
LIST_INIT(&curproxy->pendconns);
+ LIST_INIT(&curproxy->acl);
curproxy->id = strdup(args[1]);
curproxy->cap = rc;
else if (!strcmp(args[0], "enabled")) { /* enables this proxy (used to revert a disabled default) */
curproxy->state = PR_STNEW;
}
+ else if (!strcmp(args[0], "acl")) { /* add an ACL */
+ if (parse_acl((const char **)args + 1, &curproxy->acl) == NULL) {
+ Alert("parsing [%s:%d] : error detected while parsing ACL '%s'.\n",
+ file, linenum, args[1]);
+ return -1;
+ }
+ }
else if (!strcmp(args[0], "cookie")) { /* cookie name */
int cur_arg;
// if (curproxy == &defproxy) {