From 77a8ce17125041ce6b532f1189e61225462eb3b4 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 31 Oct 2023 07:32:08 -0700 Subject: [PATCH] main: fix dropped error (#1002) This isn't an actual issue because the current implementation of NewSSHServer never returns an error (https://github.com/slackhq/nebula/blob/v1.7.2/sshd/server.go#L56), but still good to fix so no surprises happen in the future. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 883e562..08a32ff 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,9 @@ func Main(c *config.C, configTest bool, buildVersion string, logger *logrus.Logg tunCidr := certificate.Details.Ips[0] ssh, err := sshd.NewSSHServer(l.WithField("subsystem", "sshd")) + if err != nil { + return nil, util.ContextualizeIfNeeded("Error while creating SSH server", err) + } wireSSHReload(l, ssh, c) var sshStart func() if c.GetBool("sshd.enabled", false) {