tailscale/wgengine
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
..
bench go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
filter go.mod: update netaddr 2021-06-02 09:05:06 -07:00
magicsock wgengine/magicsock: delete dead code 2021-05-28 17:02:08 -07:00
monitor all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
netstack all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
router wgenine/router: fix OpenBSD route creation 2021-06-10 10:48:33 -07:00
wgcfg go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
wglog wgengine/wglog: match upstream wireguard-go's code for wireguardGoString 2021-06-04 13:06:28 -07:00
winnet wgengine/winnet: don't build on non-windows 2021-02-09 21:09:24 -08:00
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
pendopen.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
userspace_test.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
userspace.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
watchdog_test.go wgengine: extend TestWatchdog timeout on macOS 2021-03-27 09:27:11 -07:00
watchdog.go wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 2021-04-02 00:59:44 -07:00
wgengine.go tailcfg: add Endpoint, EndpointType, MapRequest.EndpointType 2021-04-13 10:12:14 -07:00