Skip to content

Commit

Permalink
Merge pull request #105 from kuroa-me/main
Browse files Browse the repository at this point in the history
Skip warning about rules in legacy iptables.
  • Loading branch information
squeed authored Jul 31, 2023
2 parents 5dc28b7 + 45291ce commit b20e55f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ func (ipt *IPTables) Stats(table, chain string) ([][]string, error) {

ipv6 := ipt.proto == ProtocolIPv6

// Skip the warning if exist
if strings.HasPrefix(lines[0], "#") {
lines = lines[1:]
}

rows := [][]string{}
for i, line := range lines {
// Skip over chain name and field header
Expand Down

0 comments on commit b20e55f

Please sign in to comment.