Skip to content

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fmoehler
Copy link
Contributor

@fmoehler fmoehler commented Apr 30, 2025

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

@fmoehler fmoehler force-pushed the enable-ip-prefixes branch 6 times, most recently from af01db3 to 9795954 Compare May 7, 2025 08:15
@fmoehler fmoehler force-pushed the enable-ip-prefixes branch from 9795954 to f6ad119 Compare May 7, 2025 08:24
Comment on lines 1533 to 1534
func (p linux) GetDefaultNetwork(ipv6 bool) (boshsettings.Network, error) {
return p.defaultNetworkResolver.GetDefaultNetwork(ipv6)
Copy link
Member

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.

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants