From 58e35019108a69d5ac9d68d07732a92499783376 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 8 Jun 2022 09:17:14 +0200 Subject: [PATCH] BUG/MEDIUM: mailers: Set the object type for check attached to an email alert The health-check attached to an email alert has no type. It is unexpected, and since the 2.6, it is important because we rely on it to know the application type in front of a connection at the stream-connector level. Because the object type is not set, the SE descriptor is not properly initialized, leading to a segfault when a connection to the SMTP server is established. This patch must be backported to 2.6 and may be backported as far as 2.0. However, it is only an issue for the 2.6 and upper. --- src/mailers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mailers.c b/src/mailers.c index 34eaa5bb6..05d531306 100644 --- a/src/mailers.c +++ b/src/mailers.c @@ -120,6 +120,7 @@ int init_email_alert(struct mailers *mls, struct proxy *p, char **err) LIST_INIT(&q->email_alerts); HA_SPIN_INIT(&q->lock); + check->obj_type = OBJ_TYPE_CHECK; check->inter = mls->timeout.mail; check->rise = DEF_AGENT_RISETIME; check->proxy = p; -- 2.47.3