diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/snmpd/parse.y | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index f3b0925aa95..541a65f21ef 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.89 2024/02/06 15:36:11 martijn Exp $ */ +/* $OpenBSD: parse.y,v 1.90 2024/02/20 12:32:48 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -1759,9 +1759,13 @@ resolve_oids(void) free(trapcmds); for (i = 0; i < ntrapaddresses; i++) { - if (resolve_oid( - &trapaddresses[i].tr->ta_oid, &trapaddresses[i].oid) == -1) - return -1; + if (trapaddresses[i].oid.descriptor == NULL) + trapaddresses[i].tr->ta_oid.bo_n = 0; + else { + if (resolve_oid(&trapaddresses[i].tr->ta_oid, + &trapaddresses[i].oid) == -1) + return -1; + } TAILQ_INSERT_TAIL(&conf->sc_trapreceivers, trapaddresses[i].tr, entry); } |