mibble icon indicating copy to clipboard operation
mibble copied to clipboard

Issue in parsing value ranges

Open nickaein opened this issue 6 years ago • 2 comments

There seems to be an issue in parsing value-range constraints. Consider the following toy MIB:

MY-MIB DEFINITIONS ::= BEGIN

IMPORTS OBJECT-TYPE, Integer32 FROM SNMPv2-SMI;

my-parameter OBJECT-TYPE
	SYNTAX 	Integer32 (100..200)
	MAX-ACCESS  	read-only
	STATUS 	current
	DESCRIPTION "Simple parameter"
	::= { iso 1 }

END

The exitValueConstraint method process the constraints and eventually creates an ValueRangeConstraint instance with lowerbound of 200 and no upperbound. There is possibly an issue inside for loop in determining the presence of low and upper bounds.

nickaein avatar Jul 15 '18 07:07 nickaein

Good catch. Issue is on line 1179 where strictLower should be lower. Must have been tumbled around in one refactoring or another.

cederberg avatar Jul 15 '18 09:07 cederberg

That seems to take care of it. Thanks for quick update!

nickaein avatar Jul 15 '18 11:07 nickaein