mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-18 12:32:13 +00:00
wgengine/router: make supportsV6NAT check catch more cases
Updates #4459 Change-Id: Ic27621569d2739298e652769d10e38608c6012be Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
fc2f628d4c
commit
0ce67ccda6
@ -1514,8 +1514,14 @@ func supportsV6NAT() bool {
|
|||||||
// Can't read the file. Assume SNAT works.
|
// Can't read the file. Assume SNAT works.
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if bytes.Contains(bs, []byte("nat\n")) {
|
||||||
return bytes.Contains(bs, []byte("nat\n"))
|
return true
|
||||||
|
}
|
||||||
|
// In nftables mode, that proc file will be empty. Try another thing:
|
||||||
|
if exec.Command("modprobe", "ip6table_nat").Run() == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkIPRuleSupportsV6(logf logger.Logf) error {
|
func checkIPRuleSupportsV6(logf logger.Logf) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user