diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-11-01 13:34:45 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-11-01 13:34:45 +0000 |
commit | c6657493b1c127c7447312b48109e8b5443d9713 (patch) | |
tree | 79eeb3ad43a8decdb4ead11b1af88e71dc29513b | |
parent | 8df9aa6caf068181da20dd2aa7e1867052c5734f (diff) |
On endOfMibView reset OID back to the original requested OID as per RFC3416
section 4.2.2, instead of returning the (internal) current OID, which could
happen on empty tables.
Found and diff tested by Ryan Freeman (ryan <at> slipgate <dot> org)
OK sthen@
-rw-r--r-- | lib/libagentx/agentx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libagentx/agentx.c b/lib/libagentx/agentx.c index 4902069d093..6c929588db1 100644 --- a/lib/libagentx/agentx.c +++ b/lib/libagentx/agentx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agentx.c,v 1.19 2022/10/14 15:26:58 martijn Exp $ */ +/* $OpenBSD: agentx.c,v 1.20 2022/11/01 13:34:44 martijn Exp $ */ /* * Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org> * @@ -3426,6 +3426,8 @@ agentx_varbind_endofmibview(struct agentx_varbind *axv) return; } + bcopy(&(axv->axv_start), &(axv->axv_vb.avb_oid), + sizeof(axv->axv_start)); axv->axv_vb.avb_type = AX_DATA_TYPE_ENDOFMIBVIEW; if (axv->axv_axo != NULL) |