|
@@ -373,18 +373,13 @@ func (ipt *IPTables) NewChain(table, chain string) error {
|
|
|
return ipt.run("-t", table, "-N", chain)
|
|
|
}
|
|
|
|
|
|
+const existsErr = 1
|
|
|
+
|
|
|
|
|
|
|
|
|
func (ipt *IPTables) ClearChain(table, chain string) error {
|
|
|
err := ipt.NewChain(table, chain)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- existsErr := 1
|
|
|
- if ipt.mode == "nf_tables" {
|
|
|
- existsErr = 4
|
|
|
- }
|
|
|
-
|
|
|
eerr, eok := err.(*Error)
|
|
|
switch {
|
|
|
case err == nil:
|