mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-09 06:46:55 +00:00
[MINOR] config: add pointer to file name in block/redirect/use_backend/monitor rules
Those conditions already referenced the config line, but not the file.
This commit is contained in:
parent
092549fa85
commit
88922354fb
@ -1,23 +1,23 @@
|
||||
/*
|
||||
include/types/acl.h
|
||||
This file provides structures and types for ACLs.
|
||||
|
||||
Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation, version 2.1
|
||||
exclusively.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
* include/types/acl.h
|
||||
* This file provides structures and types for ACLs.
|
||||
*
|
||||
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, version 2.1
|
||||
* exclusively.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_ACL_H
|
||||
#define _TYPES_ACL_H
|
||||
@ -320,6 +320,7 @@ struct acl_cond {
|
||||
struct list suites; /* list of acl_term_suites */
|
||||
int pol; /* polarity: ACL_COND_IF / ACL_COND_UNLESS */
|
||||
unsigned int requires; /* or'ed bit mask of all acl's ACL_USE_* */
|
||||
const char *file; /* config file where the condition is declared */
|
||||
int line; /* line in the config file where the condition is declared */
|
||||
};
|
||||
|
||||
|
@ -1661,6 +1661,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
cond->file = file;
|
||||
cond->line = linenum;
|
||||
curproxy->acl_requires |= cond->requires;
|
||||
LIST_ADDQ(&curproxy->block_cond, &cond->list);
|
||||
@ -1787,6 +1788,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
goto out;
|
||||
}
|
||||
|
||||
cond->file = file;
|
||||
cond->line = linenum;
|
||||
curproxy->acl_requires |= cond->requires;
|
||||
rule = (struct redirect_rule *)calloc(1, sizeof(*rule));
|
||||
@ -1853,6 +1855,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
goto out;
|
||||
}
|
||||
|
||||
cond->file = file;
|
||||
cond->line = linenum;
|
||||
curproxy->acl_requires |= cond->requires;
|
||||
if (cond->requires & ACL_USE_RTR_ANY) {
|
||||
@ -2339,6 +2342,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
cond->file = file;
|
||||
cond->line = linenum;
|
||||
curproxy->acl_requires |= cond->requires;
|
||||
LIST_ADDQ(&curproxy->mon_fail_cond, &cond->list);
|
||||
|
Loading…
Reference in New Issue
Block a user