IPv6 support for the proxmox builder.#319
Open
oromenahar wants to merge 1 commit into
Open
Conversation
9d0a6c7 to
588c136
Compare
rgl
reviewed
Jul 29, 2025
| continue | ||
| } | ||
| if addr.To4() == nil { | ||
| } else if addr.IsLinkLocalUnicast() || addr.IsMulticast() || addr.IsLoopback() { |
Contributor
There was a problem hiding this comment.
can't this be replaced with !addr.IsGlobalUnicast()?
also add || addr.IsUnspecified()?
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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