]> 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 <andoni@isc.org>
Wed, 15 Jan 2025 14:09:17 +0000 (14:09 +0000)
commit4ae4e255cf0aef16d9b1b462e08ff7237352393e
treee219263c4ec356ce95ba7b278096283cc51698e4
parent609a41517b1631c320876a41c43c68c9a0ee0f9f
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().
lib/isc/netmgr/proxystream.c
lib/isc/netmgr/streamdns.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tlsstream.c