diff options
author | 2020-08-17 15:48:28 +0000 | |
---|---|---|
committer | 2020-08-17 15:48:28 +0000 | |
commit | 3e4157feee5b05dc155b8cacda51f14b042f401e (patch) | |
tree | 97d54a4941800c2aabe7ab434f84dee4e96497e2 | |
parent | Also print a list of missing scripts in summary (diff) | |
download | wireguard-openbsd-3e4157feee5b05dc155b8cacda51f14b042f401e.tar.xz wireguard-openbsd-3e4157feee5b05dc155b8cacda51f14b042f401e.zip |
Previous commit broke two things:
1) Bulkget broke because mps_getbulkreq doesn't exactly do what it says on
the tin, so use it how it works for now.
2) A break statement got left behind resulting in only a single varbind
being answered.
Reported and tested by sthen@
-rw-r--r-- | usr.sbin/snmpd/snmpe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/snmpe.c b/usr.sbin/snmpd/snmpe.c index 9987c22c66c..8ddaaece946 100644 --- a/usr.sbin/snmpd/snmpe.c +++ b/usr.sbin/snmpd/snmpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpe.c,v 1.63 2020/08/08 13:39:57 martijn Exp $ */ +/* $OpenBSD: snmpe.c,v 1.64 2020/08/17 15:48:28 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -466,8 +466,7 @@ snmpe_parsevarbinds(struct snmp_message *msg) msg->sm_error = SNMP_ERROR_READONLY; goto varfail; case SNMP_C_GETBULKREQ: - if ((rvarbind = ober_add_sequence(NULL)) == NULL) - goto varfail; + rvarbind = NULL; if (mps_getbulkreq(msg, &rvarbind, &end, &o, (i <= msg->sm_nonrepeaters) ? 1 : msg->sm_maxrepetitions) != 0) { @@ -491,7 +490,6 @@ snmpe_parsevarbinds(struct snmp_message *msg) else ober_link_elements(pvarbind, rvarbind); pvarbind = end == NULL ? rvarbind : end; - break; } msg->sm_errstr = "none"; |