diff options
-rw-r--r-- | sos/plugins/networking.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index c7ee76b5..eed4c293 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -63,10 +63,19 @@ class Networking(Plugin): the command. If they aren't loaded, there can't possibly be any relevant rules in that table """ - if self.check_ext_prog("grep -q %s /proc/modules" % tablename): + modname = "iptable_"+tablename + if self.check_ext_prog("grep -q %s /proc/modules" % modname): cmd = "iptables -t "+tablename+" -nvL" self.add_cmd_output(cmd) + def collect_ip6table(self, tablename): + """ Same as function above, but for ipv6 """ + + modname = "ip6table_"+tablename + if self.check_ext_prog("grep -q %s /proc/modules" % modname): + cmd = "ip6tables -t "+tablename+" -nvL" + self.add_cmd_output(cmd) + def setup(self): super(Networking, self).setup() self.add_copy_spec([ @@ -95,6 +104,9 @@ class Networking(Plugin): self.collect_iptable("filter") self.collect_iptable("nat") self.collect_iptable("mangle") + self.collect_ip6table("filter") + self.collect_ip6table("nat") + self.collect_ip6table("mangle") self.add_cmd_output("netstat -neopa", root_symlink="netstat") self.add_cmd_output([ "netstat -s", @@ -113,7 +125,8 @@ class Networking(Plugin): "ip netns", "biosdevname -d", "tc -s qdisc show", - "iptables -vnxL" + "iptables -vnxL", + "ip6tables -vnxL" ]) # There are some incompatible changes in nmcli since |