From: op Date: Tue, 14 May 2024 13:34:05 +0000 (+0000) Subject: include the filter protocol version in the handshake X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a06e84490f9e419cfe140873e06f99438737db50;p=openbsd include the filter protocol version in the handshake This adds "config|protocol|0.7" during the filters handshake, like was done for the tables too, so that the filters can know the version of the protocol right from the start. ok gilles@ --- diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index 885004d1ba3..2000a46cd1d 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.75 2024/04/23 13:34:51 jsg Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.76 2024/05/14 13:34:05 op Exp $ */ /* * Copyright (c) 2018 Gilles Chehade @@ -192,6 +192,7 @@ static void lka_proc_config(struct processor_instance *pi) { io_printf(pi->io, "config|smtpd-version|%s\n", SMTPD_VERSION); + io_printf(pi->io, "config|protocol|"PROTOCOL_VERSION); io_printf(pi->io, "config|smtp-session-timeout|%d\n", SMTPD_SESSION_TIMEOUT); if (pi->subsystems & FILTER_SUBSYSTEM_SMTP_IN) io_printf(pi->io, "config|subsystem|smtp-in\n"); diff --git a/usr.sbin/smtpd/smtpd-filters.7 b/usr.sbin/smtpd/smtpd-filters.7 index c9587450718..3f559ff4921 100644 --- a/usr.sbin/smtpd/smtpd-filters.7 +++ b/usr.sbin/smtpd/smtpd-filters.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: smtpd-filters.7,v 1.11 2024/05/14 13:32:09 op Exp $ +.\" $OpenBSD: smtpd-filters.7,v 1.12 2024/05/14 13:34:05 op Exp $ .\" .\" Copyright (c) 2008 Janne Johansson .\" Copyright (c) 2009 Jacek Masiulaniec @@ -128,6 +128,7 @@ provides with general configuration information in the form of key-value lines: .Bd -literal -offset indent config|smtpd-version|7.5.0 +config|protocol|0.7 config|smtp-session-timeout|300 config|subsystem|smtp-in config|ready @@ -175,6 +176,7 @@ that do not require it and consumed gracefully by filters that do. There are currently three keys: .Bd -literal -offset indent config|smtpd-version|7.5.0 +config|protocol|0.7 config|smtp-session-timeout|300 config|subsystem|smtp-in .Ed