tailscale/cmd/containerboot
Irbe Krumina 9bd158cc09
cmd/containerboot,util/linuxfw: create a SNAT rule for dst/src only once, clean up if needed (#13658)
The AddSNATRuleForDst rule was adding a new rule each time it was called including:
- if a rule already existed
- if a rule matching the destination, but with different desired source already existed

This was causing issues especially for the in-progress egress HA proxies work,
where the rules are now refreshed more frequently, so more redundant rules
were being created.

This change:
- only creates the rule if it doesn't already exist
- if a rule for the same dst, but different source is found, delete it
- also ensures that egress proxies refresh firewall rules
if the node's tailnet IP changes

Updates tailscale/tailscale#13406

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-10-03 20:15:00 +01:00
..
forwarding.go cmd/containerboot,util/linuxfw: create a SNAT rule for dst/src only once, clean up if needed (#13658) 2024-10-03 20:15:00 +01:00
healthz.go cmd/containerboot: split main.go (#13517) 2024-09-19 17:58:26 +01:00
kube_test.go kube,cmd/{k8s-operator,containerboot},envknob,ipn/store/kubestore,*/depaware.txt: rename packages (#13418) 2024-09-08 20:57:29 +01:00
kube.go cmd/containerboot: split main.go (#13517) 2024-09-19 17:58:26 +01:00
main_test.go cmd/containerboot,cmd/k8s-operator: enable IPv6 for fqdn egress proxies (#12577) 2024-07-05 12:21:48 +01:00
main.go cmd/containerboot,util/linuxfw: create a SNAT rule for dst/src only once, clean up if needed (#13658) 2024-10-03 20:15:00 +01:00
serve.go cmd/containerboot: split main.go (#13517) 2024-09-19 17:58:26 +01:00
services_test.go cmd/containerboot,kube,util/linuxfw: configure kube egress proxies to route to 1+ tailnet targets (#13531) 2024-09-29 16:30:53 +01:00
services.go cmd/containerboot,util/linuxfw: create a SNAT rule for dst/src only once, clean up if needed (#13658) 2024-10-03 20:15:00 +01:00
settings.go cmd/containerboot,kube,util/linuxfw: configure kube egress proxies to route to 1+ tailnet targets (#13531) 2024-09-29 16:30:53 +01:00
tailscaled.go cmd/containerboot: split main.go (#13517) 2024-09-19 17:58:26 +01:00
test_tailscale.sh cmd/containerboot: make a tests table, add more tests. 2022-11-10 09:14:27 -08:00
test_tailscaled.sh cmd/containerboot: avoid leaking bash scripts after test runs 2023-09-21 13:17:48 -07:00