tailscale/wgengine/router
Andrew Dunham 6540d1f018 wgengine/router: look up absolute path to netsh.exe on Windows
This is in response to logs from a customer that show that we're unable
to run netsh due to the following error:

    router: firewall: adding Tailscale-Process rule to allow UDP for "C:\\Program Files\\Tailscale\\tailscaled.exe" ...
    router: firewall: error adding Tailscale-Process rule: exec: "netsh": cannot run executable found relative to current directory:

There's approximately no reason to ever dynamically look up the path of
a system utility like netsh.exe, so instead let's first look for it
in the System32 directory and only if that fails fall back to the
previous behaviour.

Updates #10804

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I68cfeb4cab091c79ccff3187d35f50359a690573
2024-01-10 20:20:19 -05:00
..
callback.go wgengine/router: implement UpdateMagicsockPort for CallbackRouter (#10494) 2023-12-07 10:45:14 -05:00
ifconfig_windows_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ifconfig_windows.go all: cleanup unused code, part 2 (#10670) 2023-12-21 17:40:03 -08:00
router_darwin.go all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
router_default.go all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
router_fake.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 2023-12-05 18:12:02 -05:00
router_freebsd.go all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
router_linux_test.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 2023-12-05 18:12:02 -05:00
router_linux.go all: cleanup unused code, part 1 (#10661) 2023-12-20 14:50:30 -08:00
router_openbsd.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 2023-12-05 18:12:02 -05:00
router_test.go all: cleanup unused code, part 2 (#10670) 2023-12-21 17:40:03 -08:00
router_userspace_bsd.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 2023-12-05 18:12:02 -05:00
router_windows_test.go wgengine/router: look up absolute path to netsh.exe on Windows 2024-01-10 20:20:19 -05:00
router_windows.go wgengine/router: look up absolute path to netsh.exe on Windows 2024-01-10 20:20:19 -05:00
router.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 2023-12-05 18:12:02 -05:00
runner.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00