Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
fix ipv6 loopback resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
bonifaido committed Apr 8, 2024
1 parent b8c8aad commit 6e05b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/service/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func resolveAddress(address string) []netip.AddrPort {
if err == nil {
for _, ip := range netips {
if addr, ok := netip.AddrFromSlice(ip); ok {
// if the address is ipv4 in ipv6 format and it is a loopback address, convert it to ipv6 loopback
if addr.Is4In6() && addr.IsLoopback() {
addr = netip.IPv6Loopback()
}
addrs[addr] = struct{}{}
}
}
Expand Down

0 comments on commit 6e05b8a

Please sign in to comment.