util/linuxfw,wgengine/router: enable IPv6 configuration when netfilter is disabled

Updates #11434

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2024-03-21 15:43:12 -07:00
committed by James Tucker
parent 8444937c89
commit 3f7313dbdb
4 changed files with 12 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ func newIPTablesRunner(logf logger.Logf) (*iptablesRunner, error) {
}
supportsV6, supportsV6NAT := false, false
v6err := checkIPv6(logf)
v6err := CheckIPv6(logf)
ip6terr := checkIP6TablesExists()
var ipt6 *iptables.IPTables
switch {

View File

@@ -130,7 +130,7 @@ func errCode(err error) int {
// missing. It does not check that IPv6 is currently functional or
// that there's a global address, just that the system would support
// IPv6 if it were on an IPv6 network.
func checkIPv6(logf logger.Logf) error {
func CheckIPv6(logf logger.Logf) error {
_, err := os.Stat("/proc/sys/net/ipv6")
if os.IsNotExist(err) {
return err

View File

@@ -546,7 +546,7 @@ func newNfTablesRunner(logf logger.Logf) (*nftablesRunner, error) {
}
nft4 := &nftable{Proto: nftables.TableFamilyIPv4}
v6err := checkIPv6(logf)
v6err := CheckIPv6(logf)
if v6err != nil {
logf("disabling tunneled IPv6 due to system IPv6 config: %v", v6err)
}