From: Christopher Faulet Date: Wed, 8 Jun 2022 07:17:14 +0000 (+0200) Subject: BUG/MEDIUM: mailers: Set the object type for check attached to an email alert X-Git-Tag: v2.7-dev1~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58e35019108a69d5ac9d68d07732a92499783376;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mailers.c b/src/mailers.c index 34eaa5bb64..05d531306f 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;