tailscale/wgengine/router
Fletcher Nichol a49df5cfda wgenine/router: fix OpenBSD route creation
The route creation for the `tun` device was augmented in #1469 but
didn't account for adding IPv4 vs. IPv6 routes. There are 2 primary
changes as a result:

* Ensure that either `-inet` or `-inet6` was used in the
  [`route(8)`](https://man.openbsd.org/route) command
* Use either the `localAddr4` or `localAddr6` for the gateway argument
  depending which destination network is being added

The basis for the approach is based on the implementation from
`router_userspace_bsd.go`, including the `inet()` helper function.

Fixes #2048
References #1469

Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
2021-06-10 10:48:33 -07:00
..
callback.go net/dns: some post-review cleanups. 2021-04-07 15:40:31 -07:00
ifconfig_windows_test.go wgengine/router{win}: ignore broadcast routes added by Windows when removing routes. 2021-04-24 14:13:35 -07:00
ifconfig_windows.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_darwin.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_default.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_fake.go wgengine: pass in an explicit router.Router, rather than a generator. 2021-03-26 22:01:55 -07:00
router_freebsd.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_linux_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_linux.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_openbsd.go wgenine/router: fix OpenBSD route creation 2021-06-10 10:48:33 -07:00
router_test.go net/dns: add GOOS build tags 2021-04-29 21:34:55 -07:00
router_userspace_bsd.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router_windows.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
router.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
runner.go wgengine/router: set up basic IPv6 routing/firewalling. 2020-09-24 18:37:00 -07:00