freebsd: ignore IPv6 for now

FreeBSD tun devices don't work with the way we implement IPv6
https://github.com/tailscale/tailscale/issues/1307

At least for now, remove any IPv6 addresses from the netmap.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
Denton Gentry
2021-03-03 11:34:37 -08:00
committed by Denton Gentry
parent 524fb2c190
commit 061422affc
5 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,39 @@
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by tailscale.com/cmd/cloner -type Config; DO NOT EDIT.
package router
import (
"inet.af/netaddr"
"tailscale.com/types/preftype"
"tailscale.com/wgengine/router/dns"
)
// Clone makes a deep copy of Config.
// The result aliases no memory with the original.
func (src *Config) Clone() *Config {
if src == nil {
return nil
}
dst := new(Config)
*dst = *src
dst.LocalAddrs = append(src.LocalAddrs[:0:0], src.LocalAddrs...)
dst.Routes = append(src.Routes[:0:0], src.Routes...)
dst.DNS = *src.DNS.Clone()
dst.SubnetRoutes = append(src.SubnetRoutes[:0:0], src.SubnetRoutes...)
return dst
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type Config
var _ConfigNeedsRegeneration = Config(struct {
LocalAddrs []netaddr.IPPrefix
Routes []netaddr.IPPrefix
DNS dns.Config
SubnetRoutes []netaddr.IPPrefix
SNATSubnetRoutes bool
NetfilterMode preftype.NetfilterMode
}{})