Fix default machine ID to respect BitsMachineID setting

Co-authored-by: YoshiyukiMineo <7577673+YoshiyukiMineo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andYoshiyukiMineo committed 2026-02-12 05:43:24 +00:00
1 parent 806997932e
commit f8ce8840b5
3 files changed
+102 -1

No files matched your search

+10
View File
@@ -34,3 +34,13 @@ func NewNilInterfaceAddrs() types.InterfaceAddrs {
return []net.Addr{}, nil
}
}
// NewInterfaceAddrsWithIP returns a private IP address with the given IP.
func NewInterfaceAddrsWithIP(ip net.IP) types.InterfaceAddrs {
ifat := make([]net.Addr, 0, 1)
ifat = append(ifat, &net.IPNet{IP: ip, Mask: []byte{255, 0, 0, 0}})
return func() ([]net.Addr, error) {
return ifat, nil
}
}