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

check validation when parse CIDR #30825

Closed
wants to merge 2 commits into from
Closed

check validation when parse CIDR #30825

wants to merge 2 commits into from

Conversation

daixiang0
Copy link

@daixiang0 daixiang0 commented Mar 14, 2019

To setup network environment, if specify invalid CIDR address, the setup would be failed which is hard to debug which is common when setup CNI in k8s.

So add validation check when parse CIDR address.

Check way refers to https://stackoverflow.com/questions/50084229/bash-check-if-cidr-address-is-valid.

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Mar 14, 2019
@gopherbot
Copy link

This PR (HEAD: 238fc44) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/167391 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Mikio Hara:

Patch Set 3: Code-Review-2

-2 temporarily.

sorry, but i don't understand the issue you want to address. can you please file an issue?

in addition:


Please don’t reply on this GitHub thread. Visit golang.org/cl/167391.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Long Dai:

Patch Set 3:

sorry, but i don't understand the issue you want to address. can you please file an issue?

In fact, i setup an invalid CIDR address by mistake in k8s CNI then all pods in different nodes can not communicate each other, then i find code never check a CIDR address is valid or not, so have the PR.

Based on example in https://golang.org/pkg/net/#ParseCIDR, test some invalid CIDR address like 10.97.0.0/12, 192.167.0.0/12, all can work. They are invalid based on my knowledge, aren't they?

The check way refers to https://stackoverflow.com/questions/50084229/bash-check-if-cidr-address-is-valid.

in addition:

Sorry about it, i will add them if the PR is meaningful for your.


Please don’t reply on this GitHub thread. Visit golang.org/cl/167391.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Mikio Hara:

Patch Set 3:

Sorry about it, i will add them if the PR is meaningful for your.

please file an issue first; see https://golang.org/project/#howto

please be informed that you need to convince people that your issue is really worth resolving in the standard library first. an issue in the issue tracker is much appropriate for that purpose.


Please don’t reply on this GitHub thread. Visit golang.org/cl/167391.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants