Make 'any' a reserved name for prefixlists

This commit is contained in:
Pim van Pelt
2023-01-16 14:20:07 +00:00
parent 8a7c690ee5
commit 0e4490fc06
3 changed files with 25 additions and 1 deletions

View File

@ -113,6 +113,12 @@ def validate_prefixlists(yaml):
for plname, pl in yaml["prefixlists"].items():
logger.debug(f"prefixlist {plname}: {pl}")
if plname in ["any"]:
## Note: ACL 'source' and 'destination', when they are empty, will resolve
## to 'any', and can thus never refer to a prefixlist called 'any'.
msgs.append(f"prefixlist {plname} is a reserved name")
result = False
members = 0
for pl_member in pl["members"]:
members += 1