aboutsummaryrefslogtreecommitdiff
path: root/net/tailscale/patches/020-tailscaled_fake_iptables.patch
blob: 2180080cadccb625cb7fb107106a4ef2c53f4448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- 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
 }