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

provider/google: Validate VPN tunnel peer_ip #5501

Merged
merged 1 commit into from
Mar 10, 2016

Conversation

evandbrown
Copy link
Contributor

No description provided.

}
}
return nil, nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a style nit, but we usually use the named result parameters for these validatefuncs.

func validatePeerAddr(i interface{}, val string) (ws []string, es []error) {
  ip := net.ParseIP(i.(string))
  if ip == nil {
    es = append(es, fmt.Errorf("..."))
    return
  }
  for _, test := range invalidPeerAddrs {
    if ... {
      es = append(es, fmt.Errorf("..."))
      break // i think only one collision is possible yeah?
    }
  }
  return
}

@phinze
Copy link
Contributor

phinze commented Mar 10, 2016

Little style nit I left as an FYI - this LGTM!

phinze added a commit that referenced this pull request Mar 10, 2016
provider/google: Validate VPN tunnel peer_ip
@phinze phinze merged commit 5ece31d into hashicorp:master Mar 10, 2016
@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants