-
Notifications
You must be signed in to change notification settings - Fork 119
skip network resolution if prefix defined #351
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
base: main
Are you sure you want to change the base?
Conversation
3d40670
to
84a5c30
Compare
af01db3
to
9795954
Compare
9795954
to
f6ad119
Compare
platform/linux_platform.go
Outdated
func (p linux) GetDefaultNetwork(ipv6 bool) (boshsettings.Network, error) { | ||
return p.defaultNetworkResolver.GetDefaultNetwork(ipv6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than having a bool
hear could boshsettings.Network
be changed to include IP version information?
It seems odd for the IPv6-ness of the network to be communicated in a way that is disjoint from Network
itself.
platform/net/ip/ip_resolver.go
Outdated
@@ -20,6 +20,7 @@ func NetworkInterfaceToAddrsFunc(interfaceName string) ([]gonet.Addr, error) { | |||
type Resolver interface { | |||
// GetPrimaryIPv4 always returns error unless IPNet is found for given interface | |||
GetPrimaryIPv4(interfaceName string) (*gonet.IPNet, error) | |||
GetPrimaryIPv6(interfaceName string) (*gonet.IPNet, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #352 (comment)
Network Resolution only works for single IPs and not for prefixes, as they do not show with the 'ip' commands. Therefore we skip the resolution if a prefix is defined in a network other then the one for single ips /32 and /128