From 97a738f32ca2963925f274d0c60931bf1caf4618 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 17 Dec 2006 18:02:30 +0100 Subject: [PATCH] [MINOR] add the fiprm and beprm indirections to struct proxy 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 | 1 + src/cfgparse.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/types/proxy.h b/include/types/proxy.h index 28b05a05b..9e6f42123 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -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 */ diff --git a/src/cfgparse.c b/src/cfgparse.c index 959224761..b3747c4e6 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -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;