cmd/tailscale,tka: implement compat for TKA messages, minor UX tweaks
Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
+8
-3
@@ -150,7 +150,7 @@ func (a *AUM) StaticValidate() error {
|
||||
return errors.New("absent parent must be represented by a nil slice")
|
||||
}
|
||||
for i, sig := range a.Signatures {
|
||||
if len(sig.KeyID) == 0 || len(sig.Signature) != ed25519.SignatureSize {
|
||||
if len(sig.KeyID) != 32 || len(sig.Signature) != ed25519.SignatureSize {
|
||||
return fmt.Errorf("signature %d has missing keyID or malformed signature", i)
|
||||
}
|
||||
}
|
||||
@@ -196,8 +196,13 @@ func (a *AUM) StaticValidate() error {
|
||||
|
||||
case AUMNoOp:
|
||||
default:
|
||||
// TODO(tom): Ignore unknown AUMs for GA.
|
||||
return fmt.Errorf("unknown AUM kind: %v", a.MessageKind)
|
||||
// An AUM with an unknown message kind was received! That means
|
||||
// that a future version of tailscaled added some feature we don't
|
||||
// understand.
|
||||
//
|
||||
// The future-compatibility contract for AUM message types is that
|
||||
// they must only add new features, not change the semantics of existing
|
||||
// mechanisms or features. As such, old clients can safely ignore them.
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user