diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-10-23 10:45:21 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-10-23 10:45:21 +0000 |
commit | 42aa4e4bbb9a2b9ba1a3119c4baa9c9264c5e651 (patch) | |
tree | 8eeffe2fef89df0470ce83350a9c79db3fcb06f0 /usr.sbin | |
parent | a89ed23fdd49a0443fb4f3c122d61a846c63f84c (diff) |
Always print the community.
There's no such thing as a default community.
OK benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tcpdump/print-snmp.c | 13 |
1 files changed, 2 insertions, 11 deletions
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 @@ -342,11 +342,6 @@ struct snmp3_sm { }; /* - * Defaults for SNMP PDU components - */ -#define DEF_COMMUNITY "public" - -/* * constants for ASN.1 decoding */ #define OIDMUX 40 @@ -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; |