packages/net/tailscale/patches/020-tailscaled_fake_iptable...

33 lines
940 B
Diff

--- a/wgengine/router/router_linux.go
+++ b/wgengine/router/router_linux.go
@@ -129,7 +129,7 @@ func newUserspaceRouter(logf logger.Logf
ipt4, err := iptables.NewWithProtocol(iptables.ProtocolIPv4)
if err != nil {
- return nil, err
+ ipt4, err = iptables.NewFakeWithProtocol(iptables.ProtocolIPv4)
}
v6err := checkIPv6(logf)
@@ -148,7 +148,7 @@ func newUserspaceRouter(logf logger.Logf
// if unavailable. We want that to be a non-fatal error.
ipt6, err = iptables.NewWithProtocol(iptables.ProtocolIPv6)
if err != nil {
- return nil, err
+ ipt6, err = iptables.NewFakeWithProtocol(iptables.ProtocolIPv6)
}
}
@@ -1635,11 +1635,6 @@ func checkIPv6(logf logger.Logf) error {
return fmt.Errorf("kernel doesn't support IPv6 policy routing: %w", err)
}
- // Some distros ship ip6tables separately from iptables.
- if _, err := exec.LookPath("ip6tables"); err != nil {
- return err
- }
-
return nil
}