Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Check addresses supplied by users for conflict with existing routes #1053

Merged
merged 5 commits into from
Jul 1, 2015

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Jul 1, 2015

Fixes #437, #480.

Issues a warning but carries on.

Note that we are still not checking ranges passed to IPAM; I'm still considering whether that is a good idea.

@bboreham bboreham force-pushed the 437-check-address branch from 7b55f4e to 7762771 Compare July 1, 2015 10:46
bboreham added 3 commits July 1, 2015 12:15
For a network, as used by IPAM, we care if *any* address in the range
could possibly conflict with an existing address routed by the host.
When given a single address, we only care if *that specific address*
conflicts with an existing route.
@bboreham bboreham force-pushed the 437-check-address branch from 7762771 to 9109969 Compare July 1, 2015 11:18
}
for _, route := range routes {
if route.Dst != nil && route.Dst.Contains(addr) {
return fmt.Errorf("Address %s would overlap with existing route %s", addr, route.Dst)

This comment was marked as abuse.

@rade
Copy link
Member

rade commented Jul 1, 2015

Where does the warning pop up when using the proxy? In the CLI? The proxy logs?

@bboreham
Copy link
Contributor Author

bboreham commented Jul 1, 2015

Where does the warning pop up when using the proxy? In the CLI? The proxy logs?

Nowhere, it seems.

@bboreham
Copy link
Contributor Author

bboreham commented Jul 1, 2015

#1056 created for proxy issue

@bboreham bboreham assigned rade and unassigned bboreham Jul 1, 2015
rade added a commit that referenced this pull request Jul 1, 2015
Check addresses supplied by users for conflict with existing routes.

Fixes #437. Fixes #480.
@rade rade merged commit ecfc5d0 into master Jul 1, 2015
@rade rade deleted the 437-check-address branch July 1, 2015 14:03
@rade rade modified the milestone: 1.1.0 Jul 2, 2015
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.

2 participants