diff options
Diffstat (limited to 'pysnmp/proto/mpmod/rfc3412.py')
-rw-r--r-- | pysnmp/proto/mpmod/rfc3412.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pysnmp/proto/mpmod/rfc3412.py b/pysnmp/proto/mpmod/rfc3412.py index 5f9268a5..58f3acc0 100644 --- a/pysnmp/proto/mpmod/rfc3412.py +++ b/pysnmp/proto/mpmod/rfc3412.py @@ -40,8 +40,11 @@ class HeaderData(univ.Sequence): namedtype.NamedType('msgMaxSize', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(484, 2147483647))), namedtype.NamedType('msgFlags', univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 1))), + # NOTE (etingof): constrain SNMPv3 message to only USM+ security models + # because SNMPv1/v2c seems incompatible in pysnmp implementation, not sure + # if it's intended by the SNMP standard at all... namedtype.NamedType('msgSecurityModel', - univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647))) + univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(3, 2147483647))) ) |