1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-10-17 20:05:55 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Casey Marshall
fdcd3bb574
Fix nil dereference in nodes list command.
Fixes a nil pointer dereference observed when listing nodes that have
not yet connected.

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb931a4]

goroutine 1 [running]:
github.com/juanfont/headscale/cmd/headscale/cli.glob..func8(0x13c93e0, 0xc0004c4220, 0x0, 0x2)
	/go/src/headscale/cmd/headscale/cli/nodes.go:74 +0x364
github.com/spf13/cobra.(*Command).execute(0x13c93e0, 0xc0004c41e0, 0x2, 0x2, 0x13c93e0, 0xc0004c41e0)
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x13ca2e0, 0xc000497110, 0xe76416, 0x6)
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
	/go/src/headscale/cmd/headscale/headscale.go:89 +0x805
command terminated with exit code 2
```
2021-06-19 18:20:27 -05:00
Ward Vandewege
d1c3faae5f Remove superfluous test support code. Fix bug in node list cli command.
Add tests.
2021-05-23 09:55:15 -04:00
Ward Vandewege
41f6740ddd Add support for ephemeral nodes via a special type of pre-auth key. Add
tests for that feature.

Other fixes: clean up a few typos in comments. Fix a bug that caused the
tests to run four times each. Be more consistent in the use of log
rather than fmt to print errors and notices.
2021-05-22 20:18:29 -04:00
Juan Font Alonso
8ad366f977 Use JsonOutput in version too 2021-05-08 17:06:36 +02:00
Juan Font Alonso
abde7dddb7 More json output 2021-05-08 13:58:51 +02:00
Juan Font Alonso
3b34f715ce Adding support for JSON-formatted output 1/n 2021-05-08 13:28:22 +02:00
Juan Font Alonso
c71c13366f Minor fix 2021-05-01 20:04:03 +02:00
Juan Font Alonso
404fee8361 Added list node functionality 2021-05-01 20:00:25 +02:00
Juan Font Alonso
b83318bfb3 Namespace is now a flag for all the commands 2021-04-30 00:23:26 +02:00
Juan Font Alonso
77e5255fdd Move the CLI functiontionality to the CLI package 2021-04-28 16:15:45 +02:00