-
Notifications
You must be signed in to change notification settings - Fork 92
IPv6 support for the proxmox builder. #319
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
9d0a6c7
to
588c136
Compare
builder/proxmox/common/builder.go
Outdated
continue | ||
} | ||
if addr.To4() == nil { | ||
} else if addr.IsLinkLocalUnicast() || addr.IsMulticast() || addr.IsLoopback() { |
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.
can't this be replaced with !addr.IsGlobalUnicast()
?
also add || addr.IsUnspecified()
?
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.
Added || addr.IsUnspecified()
I don't think we should change this to !addr.IsGlobalUnicast()
because this misses the ULA. We could change it to !addr.IsGlobalUnicast() && !addr.IsPrivate()
? This would inlcude 10.0.0.0/8
, 172.16.0.0/12
, 192.168.0.0/16
, fc00::/7
and all public IPs.
588c136
to
9881f1b
Compare
It first checks for a valid IPv6 or IPv4 and continues if it's not valid. After that it continues if the ip is part of linkLocalUnicat, Multicast or loopback. The first ip which doesn't match one of the following types will be returned as valid. no IPv4 or IPv6 at all SiteLocalUnicast: fec0::/10 multicast: ff00::/8 global Unicast ::/96 LinkLocalUnicat: fe80::/64 If the proxmox interface supports IPv4 and IPv6 the selected ip depends on the proxmox list sorting of the returned addresses. The first valid ip will be used which can change depending on the proxmox api. related to hashicorp#233 related to #10227 related to #10858 Signed-off-by: oromenahar <github@mkwg.de>
9881f1b
to
3617e03
Compare
Hey folks,
I added support for IPv6 and IPv4 dual stack setups or IPv6 only setups. The commit messages explains a lot for that reason I just copy the message to the description. I hope I didn't miss anything necessary and the PR can be discussed and reviewed.
It first checks for a valid IPv6 or IPv4 and continues if it's not valid. After that it continues if the ip is part of linkLocalUnicat, Multicast or loopback. The first ip which doesn't match one of the following types will be returned as valid.
no IPv4 or IPv6 at all
SiteLocalUnicast: fec0::/10
multicast: ff00::/8
LinkLocalUnicat: fe80::/64
If the proxmox interface supports IPv4 and IPv6 the selected ip depends on the proxmox list sorting of the returned addresses. The first valid ip will be used which can change depending on the proxmox api.
related to #233
related to #10227
related to #10858