mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-13 09:18:55 +07:00
fix: ipv4in6 should be converged
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@ -366,3 +367,10 @@ func BoolToString(b bool) string {
|
||||
return "0"
|
||||
}
|
||||
}
|
||||
|
||||
func ConvergeIp(addr netip.Addr) netip.Addr {
|
||||
if addr.Is4In6() {
|
||||
addr = netip.AddrFrom4(addr.As4())
|
||||
}
|
||||
return addr
|
||||
}
|
||||
|
Reference in New Issue
Block a user