about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-11T00·43+0000
committerVincent Ambo <tazjin@google.com>2020-02-11T00·43+0000
commit78b82c82a21f7e84f40754cec95e95caefa206d8 (patch)
tree22818d898a759b14f5c94aa03de2607e80c3cade
parent77085f5876210d9bcbc2f837068eef0259cae162 (diff)
fix(third_party/tailscale): Add patch to make taillogin work r/531
-rw-r--r--third_party/tailscale/0001-fix-client-logger.patch28
-rw-r--r--third_party/tailscale/default.nix2
2 files changed, 30 insertions, 0 deletions
diff --git a/third_party/tailscale/0001-fix-client-logger.patch b/third_party/tailscale/0001-fix-client-logger.patch
new file mode 100644
index 0000000000..d86694adca
--- /dev/null
+++ b/third_party/tailscale/0001-fix-client-logger.patch
@@ -0,0 +1,28 @@
+From ce33360524307b6da4f996a9f465260e121011f8 Mon Sep 17 00:00:00 2001
+From: Vincent Ambo <tazjin@google.com>
+Date: Tue, 11 Feb 2020 00:40:37 +0000
+Subject: [PATCH] fix(control): Ensure control client has a logger function
+
+For some reason this field ended up being nil in taillogin, which made
+it difficult to actually log in.
+---
+ control/controlclient/auto.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go
+index 67f187f..09cdf6f 100644
+--- a/control/controlclient/auto.go
++++ b/control/controlclient/auto.go
+@@ -160,6 +160,9 @@ func NewNoStart(opts Options) (*Client, error) {
+ //
+ // It should only be called for clients created by NewNoStart.
+ func (c *Client) Start() {
++	c.logf = func(f string, args ...interface{}) {
++		fmt.Printf(f, args)
++	}
+ 	go c.authRoutine()
+ 	go c.mapRoutine()
+ }
+-- 
+2.23.0
+
diff --git a/third_party/tailscale/default.nix b/third_party/tailscale/default.nix
index 6a80d760e5..fe6721457d 100644
--- a/third_party/tailscale/default.nix
+++ b/third_party/tailscale/default.nix
@@ -16,6 +16,8 @@ in buildGoModule rec {
     sha256 = "1islxzr8lhnl2f0r686mcciwb8lzvqjczg9fs0nagr5pp6dsi9fa";
   };
 
+  patches = [ ./0001-fix-client-logger.patch ];
+
   goPackagePath = "tailscale.com";
   modSha256 = "0cnih9flwgqjq4x4cwyac9yyz1prv2i2by1ki3g71ai8q621bq10";
   subPackages = [