=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/snmp/snmpc.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- src/usr.bin/snmp/snmpc.c 2021/10/21 08:17:34 1.38 +++ src/usr.bin/snmp/snmpc.c 2022/12/20 20:12:27 1.39 @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpc.c,v 1.38 2021/10/21 08:17:34 martijn Exp $ */ +/* $OpenBSD: snmpc.c,v 1.39 2022/12/20 20:12:27 martijn Exp $ */ /* * Copyright (c) 2019 Martijn van Duren @@ -468,7 +468,9 @@ argc -= optind; argv += optind; - if (version == SNMP_V1 || version == SNMP_V2C) { + if (!snmp_app->usecommonopt) { + /* No SNMP protocol settings */ + } else if (version == SNMP_V1 || version == SNMP_V2C) { if (community == NULL || community[0] == '\0') errx(1, "No community name specified."); } else if (version == SNMP_V3) {