diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-08-18 16:52:03 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-08-18 16:52:03 +0000 |
commit | 6fe41087da1cadcd9214ab956b71f6bf0c307061 (patch) | |
tree | 8dfd06dc9222442ec4aa9998ab30daa7066d8a8c /usr.sbin | |
parent | 2ce8344d10452cd01e5beb197ad37f066804d1ec (diff) |
version field was reserved but not discussed, this is done now
ok millert@ martijn@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 10 | ||||
-rw-r--r-- | usr.sbin/smtpd/lka_report.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index ebb4be56730..9e55bffe1d1 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.40 2019/08/11 17:35:27 gilles Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.41 2019/08/18 16:52:02 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -35,7 +35,7 @@ #include "smtpd.h" #include "log.h" -#define PROTOCOL_VERSION 0 +#define PROTOCOL_VERSION "0.1" struct filter; struct filter_session; @@ -740,13 +740,13 @@ filter_protocol_query(struct filter *filter, uint64_t token, uint64_t reqid, con fs = tree_xget(&sessions, reqid); if (strcmp(phase, "connect") == 0) n = io_printf(lka_proc_get_io(filter->proc), - "filter|%d|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s|%s\n", + "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s|%s\n", PROTOCOL_VERSION, tv.tv_sec, tv.tv_usec, phase, reqid, token, fs->rdns, param); else n = io_printf(lka_proc_get_io(filter->proc), - "filter|%d|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s\n", + "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, tv.tv_sec, tv.tv_usec, phase, reqid, token, param); @@ -763,7 +763,7 @@ filter_data_query(struct filter *filter, uint64_t token, uint64_t reqid, const c gettimeofday(&tv, NULL); n = io_printf(lka_proc_get_io(filter->proc), - "filter|%d|%lld.%06ld|smtp-in|data-line|" + "filter|%s|%lld.%06ld|smtp-in|data-line|" "%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, tv.tv_sec, tv.tv_usec, diff --git a/usr.sbin/smtpd/lka_report.c b/usr.sbin/smtpd/lka_report.c index 3f37b437e4f..5813c281df9 100644 --- a/usr.sbin/smtpd/lka_report.c +++ b/usr.sbin/smtpd/lka_report.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_report.c,v 1.23 2019/08/11 17:35:27 gilles Exp $ */ +/* $OpenBSD: lka_report.c,v 1.24 2019/08/18 16:52:02 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -35,7 +35,7 @@ #include "smtpd.h" #include "log.h" -#define PROTOCOL_VERSION 0 +#define PROTOCOL_VERSION "0.1" struct reporter_proc { TAILQ_ENTRY(reporter_proc) entries; @@ -156,7 +156,7 @@ report_smtp_broadcast(uint64_t reqid, const char *direction, struct timeval *tv, continue; va_start(ap, format); - if (io_printf(lka_proc_get_io(rp->name), "report|%d|%lld.%06ld|%s|%s|", + if (io_printf(lka_proc_get_io(rp->name), "report|%s|%lld.%06ld|%s|%s|", PROTOCOL_VERSION, tv->tv_sec, tv->tv_usec, direction, event) == -1 || io_vprintf(lka_proc_get_io(rp->name), format, ap) == -1) fatalx("failed to write to processor"); |