mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
.
This commit is contained in:
parent
c3e0f262d1
commit
57ade250af
10 changed files with 25 additions and 23 deletions
|
@ -126,7 +126,7 @@ type APIStatus struct {
|
|||
VersionBuild int `json:"versionBuild"`
|
||||
OS string `json:"os"`
|
||||
Architecture string `json:"architecture"`
|
||||
Concurrency int `json:"cpus"`
|
||||
Concurrency int `json:"concurrency"`
|
||||
Runtime string `json:"runtimeVersion"`
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,6 @@ func (id *Identity) UnmarshalJSON(j []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(s)
|
||||
nid, err := NewIdentityFromString(s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -327,12 +327,10 @@ func NewNode(basePath string) (*Node, error) {
|
|||
m, _ := NewMACFromBytes(i.HardwareAddr)
|
||||
if _, isZeroTier := n.networksByMAC[m]; !isZeroTier {
|
||||
addrs, _ := i.Addrs()
|
||||
if len(addrs) > 0 {
|
||||
for _, a := range addrs {
|
||||
ipn, _ := a.(*net.IPNet)
|
||||
if ipn != nil {
|
||||
interfaceAddresses[ipn.IP.String()] = ipn.IP
|
||||
}
|
||||
for _, a := range addrs {
|
||||
ipn, _ := a.(*net.IPNet)
|
||||
if ipn != nil && len(ipn.IP) > 0 && !ipn.IP.IsLinkLocalUnicast() && !ipn.IP.IsMulticast() {
|
||||
interfaceAddresses[ipn.IP.String()] = ipn.IP
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue