cmd/tailscaled: fix Windows "Allow local LAN access" regression

3f686688a6 regressed the Windows beFirewallKillswitch code,
preventing the /firewall subprocess from running.

Fixes tailscale/corp#6063

Change-Id: Ibd105759e5fecfeffc54f587f8ddcd0f1cbc4dca
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/4724/merge
Brad Fitzpatrick 2 years ago committed by Brad Fitzpatrick
parent 96afd1db46
commit 505ca2750d

@ -161,7 +161,7 @@ func main() {
flag.Parse() flag.Parse()
if flag.NArg() > 0 { if flag.NArg() > 0 {
// Windows subprocess is spawned with /subprocess, so we need to avoid this check there. // Windows subprocess is spawned with /subprocess, so we need to avoid this check there.
if runtime.GOOS != "windows" || flag.Arg(0) != "/subproc" { if runtime.GOOS != "windows" || (flag.Arg(0) != "/subproc" && flag.Arg(0) != "/firewall") {
log.Fatalf("tailscaled does not take non-flag arguments: %q", flag.Args()) log.Fatalf("tailscaled does not take non-flag arguments: %q", flag.Args())
} }
} }

Loading…
Cancel
Save