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

Select IPv4-only from host interfaces #7721

Merged
1 commit merged into from May 4, 2015
Merged

Conversation

smarterclayton
Copy link
Contributor

On other platforms, ChooseHostInterfaces() is returning IPv6
addresses, which the master can't use (endpoints must be IPv4)

Fixes #7716

break
for _, addr := range addrs {
if addrIP, _, err := net.ParseCIDR(addr.String()); err == nil {
if addrIP.To4() != nil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: Any reason not to collapse the not nil check and the assignment into a single if statement? i.e. single call to To4().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long if line is probably the reason. Agree the nesting is really high.

@ghost
Copy link

ghost commented May 4, 2015

Other than the two nits, LGTM.

@bgrant0607 bgrant0607 assigned ghost May 4, 2015
ghost pushed a commit that referenced this pull request May 4, 2015
Select IPv4-only from host interfaces
@ghost ghost merged commit cd7a0e5 into kubernetes:master May 4, 2015
@smarterclayton smarterclayton unassigned ghost Aug 12, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChooseHostInterface() can choose IPv6 which is not valid for the master
2 participants