Skip to content

Commit

Permalink
Use iptables-save alongside explicit lists of tables
Browse files Browse the repository at this point in the history
This was inspired by the recent addition of the mangle table in
iptables output for subctl gather. In addition to the current logging
of manually-specified tables (in a format which is easy to read), it
uses iptables-save to automatically determine all the active tables.
This ensures that if a user's setup relies on other tables, developers
can still determine what's happening without having to go back to the
user to run additional iptables commands.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed Sep 17, 2024
1 parent 60d5ed2 commit 5c77e90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/gather/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var ipTablesCmds = map[string]string{
"iptables": "iptables -L -n -v --line-numbers",
"iptables-nat": "iptables -L -n -v --line-numbers -t nat",
"iptables-mangle": "iptables -L -n -v --line-numbers -t mangle",
"iptables-save": "iptables-save -c",
}

var libreswanCmds = map[string]string{
Expand Down

0 comments on commit 5c77e90

Please sign in to comment.