-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
policy: T4194: Add prefix-list duplication checks #1190
Conversation
Prefix-list should not be duplicatied as FRR doesn't accept it One option when it can be duplicated when it uses "le" or "ge"
This PR can not be merged. If a user has a prefix-list with duplicates image upgrade will fail. |
As I understand user can't contain 2 same prefixes with different
Also, this check is present in 1.3
Though VyOS 1.2 just accept the first seq and ignore others.
Need to think about migration. |
Okay - then this PR is legit. Just tested on 1.3.0
What happens if I have two rules with the same prefix and also |
No, it doesn't. Maybe we'll find more extended/universal checks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply compare the dictionaries?
Please extend the code to simply check for duplicate dicts in for rule, rule_config in instance_config['rule'].items():
should not be too hard.
Just see if another dictionary in instance_config['rule']
has the exact same content as rule_config
Lets merge this first and add additional checks later. |
Change Summary
Prefix-list should not be duplicated as FRR doesn't accept it
One option when can be duplicated when it uses "le" or "ge"
Types of changes
Related Task(s)
Component(s) name
prefix-list
Proposed changes
How to test
Add checks for duplicate entries for the prefix list
It can contain le or get, but without such options it shouldn't accept configuration:
Config with dup prefixes
Config with dup prefixes but with "ge" option:
Checklist: