|
@@ -348,18 +348,6 @@ func (ipt *IPTables) executeList(args []string) ([]string, error) {
|
|
|
rules = rules[:len(rules)-1]
|
|
|
}
|
|
|
|
|
|
- // nftables mode doesn't return an error code when listing a non-existent
|
|
|
- // chain. Patch that up.
|
|
|
- if len(rules) == 0 && ipt.mode == "nf_tables" {
|
|
|
- v := 1
|
|
|
- return nil, &Error{
|
|
|
- cmd: exec.Cmd{Args: args},
|
|
|
- msg: fmt.Sprintf("%s: No chain/target/match by that name.\n", getIptablesCommand(ipt.proto)),
|
|
|
- proto: ipt.proto,
|
|
|
- exitStatus: &v,
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
for i, rule := range rules {
|
|
|
rules[i] = filterRuleOutput(rule)
|
|
|
}
|