]> git.ipfire.org Git - thirdparty/bind9.git/commit
Do not stop timer in isc_nm_read_stop() in manual timer mode
authorArtem Boldariev <artem@isc.org>
Tue, 16 Jul 2024 13:38:56 +0000 (16:38 +0300)
committerAndoni Duarte Pintado <andoni@isc.org>
Wed, 15 Jan 2025 15:05:56 +0000 (16:05 +0100)
commitc53541bfc5003c4bafbee430a7a33c457259f4f6
treecffe0eff2b1691538c4cd3d43af9ef8c257bbc08
parent36e9720d24a6c7d7174cdf38ff9ec51bd1ef802d
Do not stop timer in isc_nm_read_stop() in manual timer mode

A call to isc_nm_read_stop() would always stop reading timer even in
manual timer control mode which was added with StreamDNS in mind. That
looks like an omission that happened due to how timers are controlled
in StreamDNS where we always stop the timer before pausing reading
anyway (see streamdns_on_complete_dnsmessage()). That would not work
well for HTTP, though, where we might want pause reading without
stopping the timer in the case we want to split incoming data into
multiple chunks to be processed independently.

I suppose that it happened due to NM refactoring in the middle of
StreamDNS development (at the time isc_nm_cancelread() and
isc_nm_pauseread() were removed), as the StreamDNS code seems to be
written as if timers are not stoping during a call to
isc_nm_read_stop().

(cherry picked from commit 4ae4e255cf0aef16d9b1b462e08ff7237352393e)
lib/isc/netmgr/proxystream.c
lib/isc/netmgr/streamdns.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tlsstream.c