From: martijn Date: Thu, 16 Nov 2023 13:25:07 +0000 (+0000) Subject: avi_origid must also be set when transitioning out of the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3cf38abb111564bf061782a81a33d206e3c5b072;p=openbsd 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@ --- 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 @@ -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);