mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/router/router_userspace_bsd: on Mac the route program syntax expects delete not del -- this had caused router reconfig to fail in some cases. Fixes #673
Signed-off-by: Mike Kramlich <groglogic@gmail.com>
This commit is contained in:
parent
95a18f815c
commit
6fa7a9a055
@ -16,6 +16,7 @@
|
||||
"github.com/tailscale/wireguard-go/tun"
|
||||
"inet.af/netaddr"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/version"
|
||||
"tailscale.com/wgengine/router/dns"
|
||||
)
|
||||
|
||||
@ -114,8 +115,12 @@ func (r *userspaceBSDRouter) Set(cfg *Config) error {
|
||||
net := route.IPNet()
|
||||
nip := net.IP.Mask(net.Mask)
|
||||
nstr := fmt.Sprintf("%v/%d", nip, route.Bits)
|
||||
del := "del"
|
||||
if version.OS() == "macOS" {
|
||||
del = "delete"
|
||||
}
|
||||
routedel := []string{"route", "-q", "-n",
|
||||
"del", "-inet", nstr,
|
||||
del, "-inet", nstr,
|
||||
"-iface", r.tunname}
|
||||
out, err := cmd(routedel...).CombinedOutput()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user