diff options
-rw-r--r-- | rpkid/rpki/resource_set.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rpkid/rpki/resource_set.py b/rpkid/rpki/resource_set.py index fcf8345a..39514ccb 100644 --- a/rpkid/rpki/resource_set.py +++ b/rpkid/rpki/resource_set.py @@ -687,11 +687,9 @@ class resource_bag(object): temporary: in the long run, we should be using rpki.POW.IPAddress rather than long here. """ - if any(x == 'inherit' for x in resources): - raise rpki.exceptions.NotImplementedYet('The RFC3779 "inherit" element is not supported') - asn = [resource_range_as(r[0], r[1]) for r in resources[0] or ()] - v4 = [resource_range_ipv4(r[0], r[1]) for r in resources[1] or ()] - v6 = [resource_range_ipv6(r[0], r[1]) for r in resources[2] or ()] + asn = inherit_token if resources[0] == "inherit" else [resource_range_as( r[0], r[1]) for r in resources[0] or ()] + v4 = inherit_token if resources[1] == "inherit" else [resource_range_ipv4(r[0], r[1]) for r in resources[1] or ()] + v6 = inherit_token if resources[2] == "inherit" else [resource_range_ipv6(r[0], r[1]) for r in resources[2] or ()] return cls(resource_set_as(asn) if asn else None, resource_set_ipv4(v4) if v4 else None, resource_set_ipv6(v6) if v6 else None) |