summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2023-11-16 13:25:08 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2023-11-16 13:25:08 +0000
commit5f54248e1ae5f3898880e67b39a390c94d901614 (patch)
tree2a879db6a956f03bdc338766e5235f11677b2a6c /usr.sbin
parent88123b0ea31b47c9d0fea33185a18387bd4c70af (diff)
avi_origid must also be set when transitioning out of the
APPL_VBSTATE_MUSTFILL state, else snmpd won't like use once we reach EOMV of our view of the world. OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/snmpd/application.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c
index 5e32e3b9534..7896929dd10 100644
--- a/usr.sbin/snmpd/application.c
+++ b/usr.sbin/snmpd/application.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: application.c,v 1.38 2023/11/15 13:36:11 martijn Exp $ */
+/* $OpenBSD: application.c,v 1.39 2023/11/16 13:25:07 martijn Exp $ */
/*
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
@@ -1368,6 +1368,8 @@ appl_response(struct appl_backend *backend, int32_t requestid,
origvb->avi_state == APPL_VBSTATE_DONE) {
origvb->avi_sub->avi_varbind.av_oid =
origvb->avi_varbind.av_oid;
+ origvb->avi_sub->avi_origid =
+ origvb->avi_varbind.av_oid;
origvb->avi_sub->avi_state = APPL_VBSTATE_NEW;
}
origvb = origvb->avi_next;
@@ -1663,9 +1665,11 @@ appl_varbind_backend(struct appl_varbind_internal *ivb)
ivb->avi_state = APPL_VBSTATE_DONE;
if (ivb->avi_varbind.av_value == NULL)
return -1;
- if (ivb->avi_sub != NULL)
+ if (ivb->avi_sub != NULL) {
ivb->avi_sub->avi_varbind.av_oid =
ivb->avi_varbind.av_oid;
+ ivb->avi_sub->avi_origid = ivb->avi_origid;
+ }
ivb = ivb->avi_sub;
} while (ivb != NULL);