Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Martin Osvald
67a8120a22 New version 3.2.8 2022-02-11 11:11:48 +01:00
Martin Osvald
dd82c06d2a New version 3.2.8 2022-02-10 19:21:41 +01:00
Pavel Zhukov
daad4bb52f http_h2.c: properly detect when client sent GOAWAY
Resolves: #1989686
2021-08-03 19:59:46 +02:00
4 changed files with 70 additions and 4 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@
/cassandane-testdata-ca669d4b.tar.gz
/cassandane-17d372f.tar.gz
/cyrus-imapd-3.2.4.tar.gz
/cyrus-imapd-3.2.8.tar.gz

View file

@ -0,0 +1,55 @@
From 2696ed7219eacbe42e1b11c4f9fbdf61be21b82d Mon Sep 17 00:00:00 2001
From: Ken Murchison <murch@fastmail.com>
Date: Sun, 26 Apr 2020 15:46:25 -0400
Subject: [PATCH] http_h2.c: properly detect when we're done with the
connection (the client has sent GOAWAY)
---
imap/http_h2.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/imap/http_h2.c b/imap/http_h2.c
index b4d704ddd5..a2de420abb 100644
--- a/imap/http_h2.c
+++ b/imap/http_h2.c
@@ -682,6 +682,12 @@ HIDDEN void http2_output(struct transaction_t *txn)
txn->flags.conn = CONN_CLOSE;
}
}
+ else if (!nghttp2_session_want_read(ctx->session)) {
+ /* We're done */
+ syslog(LOG_DEBUG, "closing connection");
+ txn->flags.conn = CONN_CLOSE;
+ return;
+ }
}
@@ -691,9 +697,11 @@ HIDDEN void http2_input(struct transaction_t *txn)
int want_read = nghttp2_session_want_read(ctx->session);
int goaway = txn->flags.conn & CONN_CLOSE;
nghttp2_error_code err = goaway ? NGHTTP2_REFUSED_STREAM : NGHTTP2_NO_ERROR;
+ struct protstream *pin = txn->conn->pin;
syslog(LOG_DEBUG, "http2_input() goaway: %d, eof: %d, want read: %d",
- goaway, txn->conn->pin->eof, want_read);
+ goaway, prot_IS_EOF(pin), want_read);
+
if (want_read && !goaway) {
/* Read frame(s) */
@@ -711,12 +719,12 @@ HIDDEN void http2_input(struct transaction_t *txn)
else {
/* Failure */
syslog(LOG_DEBUG, "nghttp2_session_recv: %s (%s)",
- nghttp2_strerror(r), prot_error(txn->conn->pin));
+ nghttp2_strerror(r), prot_error(pin));
goaway = 1;
if (r == NGHTTP2_ERR_CALLBACK_FAILURE) {
/* Client timeout */
- txn->error.desc = prot_error(txn->conn->pin);
+ txn->error.desc = prot_error(pin);
err = NGHTTP2_REFUSED_STREAM;
}
else {

View file

@ -13,8 +13,8 @@
%bcond_without cassandane
Name: cyrus-imapd
Version: 3.2.4
Release: 6%{?dist}
Version: 3.2.8
Release: 2%{?dist}
%define ssl_pem_file_prefix /etc/pki/%name/%name
@ -481,6 +481,10 @@ export CYRUS_USER=$USER
make %{?_smp_mflags} check || exit 1
%ifarch %{ix86} armv7hl
exit 0
%endif
%if %{without cassandane}
exit 0
%endif
@ -690,13 +694,19 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%changelog
* Thu Feb 10 2022 Martin Osvald <mosvald@redhat.com> - 3.2.8-1
- New version 3.2.8
* Tue Aug 3 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.4-7
- properly detect when http2 connection is closed
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 3.2.4-6
- rebuild for libpq ABI fix rhbz#1908268
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 12 2020 Pavel Zhukov <pzhukov@redhat.com> - 3.2.4-4
* Tue Jan 12 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.4-4
- Drop clamav BR for eln
* Mon Dec 14 2020 Pavel Zhukov <pzhukov@redhat.com> - 3.2.4-3

View file

@ -1,3 +1,3 @@
SHA512 (cyrus-imapd-3.2.8.tar.gz) = d35a1fb6d1d8be3cb027364d5b9f21312847ca204f01d5a6913322b1affdf93821a171c3af960133fdab334773eb01293d1461c28c310027851ab3ea8190cd50
SHA512 (cassandane-testdata-ca669d4b.tar.gz) = c153ab0a57d04d9deeabc5ef724eaecc05030c23b170abaa44eaea2e7df409efcdeb24871f7896759e85d64193fb9f289a470b0af9a593a740ffcc45c80033ff
SHA512 (cassandane-17d372f.tar.gz) = 39f069b14c797d2c03a96b135babb4039445167ab4acb21c7380d4880eb61551a85b926ac2bc0cf05384b1a145d9eeffccbfedbd51047aa78b0492a7b5e7cfd6
SHA512 (cyrus-imapd-3.2.4.tar.gz) = 68df1154e48fa8aa0b1c09ab8b9fb6026a77e5473599ef229f6fe99b097a05bd9b923dde756dd5e455bc7db0af1e59d8fd282f42f37d83edd6bdf84da0750425