[PR #87] [CLOSED] Added ability to parse IPv6 addresses with zone indices #217

Closed
opened 2026-02-28 00:41:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/87
Author: @paginabianca
Created: 8/4/2020
Status: Closed

Base: masterHead: IPv6-Zone-Index-Fix


📝 Commits (1)

  • 8b5a2f2 Added ability to parse IPv6 addresses with zone indices

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 proxmox/client.go (+3 -3)

📄 Description

If a VM has an interface that has an IPv6 address with a zone index, the API is not able to parse the address and fails when calling AgentNetworkInterface.

This is because ParseIP is used to parse the IP returned by Proxmox. By replacing that with ParseIPZone, scoped literal IPv6 addresses could be parsed correctly.

I changed the type to IPAddr, a struct of IP and a string for the zone.

I'm not sure if the changes that I made are correct. I'm really new to golang and creating PRs so any feedback is welcome.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/87 **Author:** [@paginabianca](https://github.com/paginabianca) **Created:** 8/4/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `IPv6-Zone-Index-Fix` --- ### 📝 Commits (1) - [`8b5a2f2`](https://github.com/Telmate/proxmox-api-go/commit/8b5a2f2e1c562a520ca57b48c07121d94fc79b13) Added ability to parse IPv6 addresses with zone indices ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+3 -3) </details> ### 📄 Description If a VM has an interface that has an IPv6 address with a zone index, the API is not able to parse the address and fails when calling `AgentNetworkInterface`. This is because `ParseIP` is used to parse the IP returned by Proxmox. By replacing that with `ParseIPZone`, scoped literal IPv6 addresses could be parsed correctly. I changed the type to IPAddr, a struct of IP and a string for the zone. I'm not sure if the changes that I made are correct. I'm really new to golang and creating PRs so any feedback is welcome. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#217
No description provided.