mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
util/linuxfw,go.{mod,sum}: don't log errors when deleting non-existant chains and rules (#11852)
This PR bumps iptables to a newer version that has a function to detect 'NotExists' errors and uses that function to determine whether errors received on iptables rule and chain clean up are because the rule/chain does not exist- if so don't log the error. Updates corp#19336 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
@@ -13,6 +13,12 @@ import (
|
||||
"tailscale.com/net/tsaddr"
|
||||
)
|
||||
|
||||
var testIsNotExistErr = "exitcode:1"
|
||||
|
||||
func init() {
|
||||
isNotExistError = func(e error) bool { return e.Error() == testIsNotExistErr }
|
||||
}
|
||||
|
||||
func TestAddAndDeleteChains(t *testing.T) {
|
||||
iptr := NewFakeIPTablesRunner()
|
||||
err := iptr.AddChains()
|
||||
|
Reference in New Issue
Block a user