diff --git a/go/cmd/zerotier/zerotier.go b/go/cmd/zerotier/zerotier.go index 30c7d4caf..d40eebe6f 100644 --- a/go/cmd/zerotier/zerotier.go +++ b/go/cmd/zerotier/zerotier.go @@ -109,7 +109,7 @@ func main() { case "status": authTokenRequired(authToken) cli.Status(basePath, authToken, cmdArgs, *jflag) - case "peers": + case "peers", "listpeers": authTokenRequired(authToken) cli.Peers(basePath, authToken, cmdArgs) case "roots": @@ -121,7 +121,7 @@ func main() { case "removeroot": authTokenRequired(authToken) cli.RemoveRoot(basePath, authToken, cmdArgs) - case "networks": + case "networks", "listnetworks": authTokenRequired(authToken) cli.Networks(basePath, authToken, cmdArgs) case "join": diff --git a/go/pkg/zerotier/identity.go b/go/pkg/zerotier/identity.go index 67aa0e1fa..dcd510658 100644 --- a/go/pkg/zerotier/identity.go +++ b/go/pkg/zerotier/identity.go @@ -126,7 +126,7 @@ func (id *Identity) String() string { switch id.idtype { case IdentityTypeC25519: if len(id.publicKey) == IdentityTypeC25519PublicKeySize { - return fmt.Sprintf("%.10x:0:%x", id.address, id.publicKey) + return fmt.Sprintf("%.10x:0:%x", uint64(id.address), id.publicKey) } case IdentityTypeP384: if len(id.publicKey) == IdentityTypeP384PublicKeySize { @@ -148,7 +148,11 @@ func (id *Identity) UnmarshalJSON(j []byte) error { if err != nil { return err } + fmt.Println(s) nid, err := NewIdentityFromString(s) + if err != nil { + return err + } *id = *nid - return err + return nil }