From: eric Date: Fri, 16 Nov 2018 20:55:23 +0000 (+0000) Subject: when using smtps, tls initialisation must occur after FILTER_CONNECTED X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5d65917a552991bf191e135b8872c60c086662cc;p=openbsd when using smtps, tls initialisation must occur after FILTER_CONNECTED has been evaluated. ok gilles@ --- diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index fdd8ba3eed6..e70294fba7c 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.352 2018/11/08 13:21:00 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.353 2018/11/16 20:55:23 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -1808,18 +1808,16 @@ smtp_connected(struct smtp_session *s) return; } - if (s->listener->flags & F_SMTPS) { - smtp_tls_init(s); - return; - } - smtp_filter_phase(FILTER_CONNECTED, s, ss_to_text(&s->ss)); } static void smtp_proceed_connected(struct smtp_session *s) { - smtp_send_banner(s); + if (s->listener->flags & F_SMTPS) + smtp_tls_init(s); + else + smtp_send_banner(s); } static void