The security model values 1 and 2 ("reserved for SNMPv1" and "reserved

for SNMPv2") in SNMPv3 packets shouldn't cause the security parameters
to be interpreted as a character string - those values are apparently
not supposed to show up in packets - so we handle those values in the
default case, with the security parameters treated as opaque data.

svn path=/trunk/; revision=2124
This commit is contained in:
Guy Harris 2000-07-08 08:33:29 +00:00
parent ca99a750fa
commit e6fea28e9b
1 changed files with 1 additions and 19 deletions

View File

@ -2,7 +2,7 @@
* Routines for SNMP (simple network management protocol)
* D.Jorand (c) 1998
*
* $Id: packet-snmp.c,v 1.42 2000/07/02 07:10:16 guy Exp $
* $Id: packet-snmp.c,v 1.43 2000/07/08 08:33:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1417,24 +1417,6 @@ dissect_snmp_pdu(const u_char *pd, int offset, frame_data *fd,
}
offset += length;
switch(msgsec) {
case SNMP_SEC_V1:
case SNMP_SEC_V2C:
ret = asn1_octet_string_decode (&asn1,
&secparm, &secparm_length, &length);
if (ret != ASN1_ERR_NOERROR) {
dissect_snmp_parse_error(pd, offset, fd, tree,
"Message Security Parameters", ret);
return;
}
if (snmp_tree) {
proto_tree_add_text(snmp_tree, NullTVB, offset,
length, "Message Security Parameters: %.*s",
secparm_length,
SAFE_STRING(secparm));
}
g_free(secparm);
offset += length;
break;
case SNMP_SEC_USM:
start = asn1.pointer;
ret = asn1_header_decode (&asn1, &cls, &con, &tag,