In snmpe_writecb, don't call snmpe_prepare_read() when there's still
authormartijn <martijn@openbsd.org>
Mon, 20 Nov 2023 10:32:45 +0000 (10:32 +0000)
committermartijn <martijn@openbsd.org>
Mon, 20 Nov 2023 10:32:45 +0000 (10:32 +0000)
commitbbcc24e37c28bda60e8a4e032d597b41091ce98f
treec36417ea58e9af812ffec4b95064e9c0b9660211
parentc8cb675144102a1a5c89aa59e87e7efd3698a8ea
In snmpe_writecb, don't call snmpe_prepare_read() when there's still
data left inside sm_data. If there's an incomplete packet left in the
buffer it will be called from snmpe_tryparse, if there's a complete
packet left we can end up with new events from the tcp socket, which the
tcp subsystem isn't prepared to handle.

OK tb@
usr.sbin/snmpd/snmpe.c