diff options
author | Michael Elkins <melkins@tislabs.com> | 2012-02-07 01:03:16 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2012-02-07 01:03:16 +0000 |
commit | 8d1ffb425477957565fcfd916314a74c2506a443 (patch) | |
tree | 60e93ef888de999b24a9add5f4e04e2a13103790 | |
parent | e4c5873f3c320da087d5ccd7bfa64534f97c87fc (diff) |
need to check max prefix length when checking new roa
svn path=/branches/tk161/; revision=4297
-rw-r--r-- | rpkid/rpki/gui/app/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/gui/app/views.py b/rpkid/rpki/gui/app/views.py index abfddc72..795080fc 100644 --- a/rpkid/rpki/gui/app/views.py +++ b/rpkid/rpki/gui/app/views.py @@ -472,7 +472,7 @@ def roa_create(request): # if the route was previously unknown (no covering # ROAs), then: # if the AS matches, it is valid, otherwise invalid - if route.asn == asn: + if (route.asn != 0 and route.asn == asn and route.prefixlen() <= max_prefixlen): route.status = 'valid' route.status_label = 'success' else: @@ -481,7 +481,7 @@ def roa_create(request): elif route.status == 'invalid': # if the route was previously invalid, but this new ROA # matches the ASN, it is now valid - if route.asn == asn: + if route.asn != 0 and route.asn == asn and route.prefixlen() <= max_prefixlen: route.status = 'valid' route.status_label = 'success' |