KevinLiang10 e05e620096
util/linuxfw: fix delete snat rule (#15763)
* util/linuxfw: fix delete snat rule

This pr is fixing the bug that in nftables mode setting snat-subnet-routes=false doesn't
delete the masq rule in nat table.

Updates #15661

Signed-off-by: Kevin Liang <kevinliang@tailscale.com>

* change index arithmetic in test to chunk

Signed-off-by: Kevin Liang <kevinliang@tailscale.com>

* reuse rule creation function in rule delete

Signed-off-by: Kevin Liang <kevinliang@tailscale.com>

* add test for deleting the masq rule

Signed-off-by: Kevin Liang <kevinliang@tailscale.com>

---------

Signed-off-by: Kevin Liang <kevinliang@tailscale.com>
2025-05-01 12:12:36 -04:00
..