From 8f189c919a888bf08436c015233775242d2edf0e Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 21 Feb 2024 18:00:25 +0700 Subject: [PATCH] cmd/cli: skip deactivation check for old socket server If the server is running old version of ctrld, the deactivation pin check will return 404 not found, the client should consider this as no error instead of returning invalid pin code. This allows v1.3.5 binary `ctrld start` command while the ctrld server is still running old version. I discover this while testing v1.3.5 binary on a router with old ctrld version running. --- cmd/cli/cli.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/cli/cli.go b/cmd/cli/cli.go index 2009ab5..6d6360f 100644 --- a/cmd/cli/cli.go +++ b/cmd/cli/cli.go @@ -2194,6 +2194,8 @@ func checkDeactivationPin(s service.Service) error { return errRequiredDeactivationPin // pin is required case http.StatusOK: return nil // valid pin + case http.StatusNotFound: + return nil // the server is running older version of ctrld } } mainLog.Load().Error().Msg(errInvalidDeactivationPin.Error())