MEDIUM: move listener->frontend to bind_conf->frontend
Historically, all listeners have a pointer to the frontend. But since
the introduction of SSL, we now have an intermediary layer called
bind_conf corresponding to a "bind" line. It makes no sense to have
the frontend on each listener given that it's the same for all
listeners belonging to a same bind_conf. Also certain parts like
SSL can only operate on bind_conf and need the frontend.
This patch fixes this by moving the frontend pointer from the listener
to the bind_conf. The extra indirection is quite cheap given and the
places were this is used are very scarce.
diff --git a/src/peers.c b/src/peers.c
index 1a280a5..8ffc0cb 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1753,7 +1753,7 @@
static struct appctx *peer_session_create(struct peers *peers, struct peer *peer)
{
struct listener *l = LIST_NEXT(&peers->peers_fe->conf.listeners, struct listener *, by_fe);
- struct proxy *p = l->frontend; /* attached frontend */
+ struct proxy *p = l->bind_conf->frontend; /* attached frontend */
struct appctx *appctx;
struct session *sess;
struct stream *s;