diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-09-20 17:43:30 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-09-20 17:43:30 +0000 |
commit | 79af82a18c0f9254b52623eba4ebaf766740da0b (patch) | |
tree | f248cf19bfa5fb3b66c3158071d257fdc42b86f5 /rpkid/rpki/gui/app/forms.py | |
parent | 0814a330af54a43654437c26bca0ae8b184f6805 (diff) |
use resource_range_ip.min.bits instead of resource_range_ip.datum_type.bits to get the max bits for the IP address
closes #576
svn path=/trunk/; revision=5504
Diffstat (limited to 'rpkid/rpki/gui/app/forms.py')
-rw-r--r-- | rpkid/rpki/gui/app/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/gui/app/forms.py b/rpkid/rpki/gui/app/forms.py index e74230b1..20ce4a07 100644 --- a/rpkid/rpki/gui/app/forms.py +++ b/rpkid/rpki/gui/app/forms.py @@ -256,9 +256,9 @@ class ROARequest(forms.Form): if max_prefixlen < r.prefixlen(): raise forms.ValidationError( 'max prefix length must be greater than or equal to the prefix length') - if max_prefixlen > r.datum_type.bits: + if max_prefixlen > r.min.bits: raise forms.ValidationError, \ - 'max prefix length (%d) is out of range for IP version (%d)' % (max_prefixlen, r.datum_type.bits) + 'max prefix length (%d) is out of range for IP version (%d)' % (max_prefixlen, r.min.bits) self.cleaned_data['max_prefixlen'] = str(max_prefixlen) return self.cleaned_data |