tailscale/util/linuxfw
Maisem Ali c3a8e63100 util/linuxfw: add additional nftable detection logic
We were previously using the netlink API to see if there are chains/rules that
already exist. This works fine in environments where there is either full
nftable support or no support at all. However, we have identified certain
environments which have partial nftable support and the only feasible way of
detecting such an environment is to try to create some of the chains that we
need.

This adds a check to create a dummy postrouting chain which is immediately
deleted. The goal of the check is to ensure we are able to use nftables and
that it won't error out later. This check is only done in the path where we
detected that the system has no preexisting nftable rules.

Updates #5621
Updates #8555
Updates #8762

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-18 13:39:55 -07:00
..
linuxfwtest util/linuxfw: initial implementation of package 2023-02-09 14:20:24 -05:00
detector.go util/linuxfw: move detection logic 2023-10-10 20:29:24 -07:00
fake.go util/linuxfw: move fake runner into pkg 2023-10-11 11:48:43 -07:00
helpers.go util/linuxfw: initial implementation of package 2023-02-09 14:20:24 -05:00
iptables.go util/linuxfw: move detection logic 2023-10-10 20:29:24 -07:00
iptables_runner.go cmd/containerboot: use linuxfw.NetfilterRunner 2023-10-11 12:23:52 -07:00
iptables_runner_test.go util/linuxfw: move fake runner into pkg 2023-10-11 11:48:43 -07:00
linuxfw.go util/linuxfw: rename ErrorFWModeNotSupported 2023-08-10 09:27:05 -07:00
linuxfw_unsupported.go util/linuxfw: move detection logic 2023-10-10 20:29:24 -07:00
nftables.go util/linuxfw: add additional nftable detection logic 2023-10-18 13:39:55 -07:00
nftables_runner.go util/linuxfw: add additional nftable detection logic 2023-10-18 13:39:55 -07:00
nftables_runner_test.go util/linuxfw: add additional nftable detection logic 2023-10-18 13:39:55 -07:00
nftables_types.go util/linuxfw: add new arch build constraints 2023-06-30 18:22:15 -04:00