Skip to content
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

Fix the handling of shared IPs (VIP, VRRF, etc.) when unique IP space enforcement is set. #2502

Merged
merged 1 commit into from
Nov 5, 2018

Conversation

knobix
Copy link
Contributor

@knobix knobix commented Oct 8, 2018

Fixes: #2501

It's not possible to create duplicate shared IPs in a VRF when unique IP space enforcement is on.

This is due missing parentheses around the whole logical-OR statement which causes "[...] or (
self.vrf and self.vrf.enforce_unique)
" to be always true and thus goes further to the duplicate IP address check instead of skipping this check.

Add parentheses for the logical OR-statement that checks the conditions if unique IP space enforcement is on and if the IP address is duplicate.

Fix the handling of shared IPs (VIP, VRRF, etc.) when unique IP space enforcement is set.

Add parentheses for the logical OR-statement to make the evaluation valid.

Fixes: #2501
@knobix knobix changed the title Fix the handling of shared IPs (VIP, VRRF, etc.) when unique IP space enforcement is set. #1 Fix the handling of shared IPs (VIP, VRRF, etc.) when unique IP space enforcement is set. Oct 8, 2018
@jeremystretch jeremystretch merged commit 0c86fd8 into netbox-community:develop Nov 5, 2018
@jeremystretch jeremystretch mentioned this pull request Nov 6, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unique IP space enforcement cannot be loosened for shared/virtual IPs
2 participants