diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2021-07-28 08:00:03 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2021-07-28 08:00:53 -0700 |
| commit | 690ade4ee1c0e4e30f95226f6e6ffaadbd803813 (patch) | |
| tree | 5a62878b7f71a4dcdcd7c543dd9d40b1e1de8e4f | |
| parent | f414a9cc01f3264912513d07c0244ff4f3e4ba54 (diff) | |
| download | tailscale-690ade4ee1c0e4e30f95226f6e6ffaadbd803813.tar.xz tailscale-690ade4ee1c0e4e30f95226f6e6ffaadbd803813.zip | |
ipn/ipnlocal: add URL to IP forwarding error message
Updates #606
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
| -rw-r--r-- | ipn/ipnlocal/local.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index b612ccde7..ba5a60db6 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -2743,17 +2743,18 @@ func (b *LocalBackend) CheckIPForwarding() error { return nil } + const suffix = "\nSubnet routes won't work without IP forwarding.\nSee https://tailscale.com/kb/1104/enable-ip-forwarding/" for _, key := range keys { bs, err := exec.Command("sysctl", "-n", key).Output() if err != nil { - return fmt.Errorf("couldn't check %s (%v).\nSubnet routes won't work without IP forwarding.", key, err) + return fmt.Errorf("couldn't check %s (%v)%s", key, err, suffix) } on, err := strconv.ParseBool(string(bytes.TrimSpace(bs))) if err != nil { - return fmt.Errorf("couldn't parse %s (%v).\nSubnet routes won't work without IP forwarding.", key, err) + return fmt.Errorf("couldn't parse %s (%v)%s.", key, err, suffix) } if !on { - return fmt.Errorf("%s is disabled. Subnet routes won't work.", key) + return fmt.Errorf("%s is disabled.%s", key, suffix) } } return nil |
