]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] add the fiprm and beprm indirections to struct proxy
authorWilly Tarreau <w@1wt.eu>
Sun, 17 Dec 2006 17:02:30 +0000 (18:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 17 Dec 2006 17:02:30 +0000 (18:02 +0100)
A proxy will be able to borrow parameters from another one.
In particular, the filters will be inheritable from another
proxy, and the backend parameters too.

include/types/proxy.h
src/cfgparse.c

index 28b05a05b6811b697bb88c3c876c4ba7e1e8b67e..9e6f42123703238ce15750b8f56598548303369b 100644 (file)
@@ -67,6 +67,7 @@ struct proxy {
        struct in_addr mon_net, mon_mask;       /* don't forward connections from this net (network order) FIXME: should support IPv6 */
        int state;                              /* proxy state */
        struct sockaddr_in dispatch_addr;       /* the default address to connect to */
+       struct proxy *fiprm, *beprm;            /* proxy we find filter and backend params from (default: self) */
        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 */
index 95922476125169f5079c9ddf562961d1c89aa92d..b3747c4e6c9fd48c4f6f13aa73d26f9702ea8a02 100644 (file)
@@ -1964,6 +1964,8 @@ int readcfgfile(const char *file)
        }
 
        while (curproxy != NULL) {
+               curproxy->fiprm = curproxy->beprm = curproxy;
+
                if (curproxy->state == PR_STSTOPPED) {
                        curproxy = curproxy->next;
                        continue;