From: martijn Date: Sat, 23 Oct 2021 10:45:20 +0000 (+0000) Subject: Always print the community. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=028e18d1c34d66e5ba508383b2fe70363a9ff8ce;p=openbsd Always print the community. There's no such thing as a default community. OK benno@ --- diff --git a/usr.sbin/tcpdump/print-snmp.c b/usr.sbin/tcpdump/print-snmp.c index 34d49a7863a..998f67d7e25 100644 --- a/usr.sbin/tcpdump/print-snmp.c +++ b/usr.sbin/tcpdump/print-snmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-snmp.c,v 1.26 2021/10/23 09:42:14 martijn Exp $ */ +/* $OpenBSD: print-snmp.c,v 1.27 2021/10/23 10:45:20 martijn Exp $ */ /* * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 @@ -341,11 +341,6 @@ struct snmp3_sm { {0, NULL, NULL} }; -/* - * Defaults for SNMP PDU components - */ -#define DEF_COMMUNITY "public" - /* * constants for ASN.1 decoding */ @@ -1059,11 +1054,7 @@ snmp12_print(const u_char *np, u_int length) asn1_print(&elem); return; } - /* default community */ - if (strncmp((char *)elem.data.str, DEF_COMMUNITY, - sizeof(DEF_COMMUNITY) - 1)) - /* ! "public" */ - printf("C=%.*s ", (int)elem.asnlen, elem.data.str); + printf("C=%.*s ", (int)elem.asnlen, elem.data.str); length -= count; np += count;