diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-05-19 13:09:24 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-05-19 13:09:24 -0700 |
commit | 326d9f4a7a1685d04d1f6b5fb3402bca2d23d4df (patch) | |
tree | 54fbfb60723f3a666101213e057407eed402c4fd /sbin | |
parent | e0caa608a25c8aa0894968cc68b74eaee0114f50 (diff) | |
download | iptables-rrdtool-326d9f4a7a1685d04d1f6b5fb3402bca2d23d4df.tar.gz iptables-rrdtool-326d9f4a7a1685d04d1f6b5fb3402bca2d23d4df.zip |
Partially modernize iptables/nftables/5.10 procfs situation
Diffstat (limited to 'sbin')
-rwxr-xr-x | sbin/iptables-rrdtool | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iptables-rrdtool b/sbin/iptables-rrdtool index 97dada3..95aaebc 100755 --- a/sbin/iptables-rrdtool +++ b/sbin/iptables-rrdtool @@ -42,7 +42,9 @@ update () { fi } -for table in $(cat /proc/net/ip_tables_names); do +# ~5.10 this procfs interface got removed. +#for table in $(cat /proc/net/ip_tables_names); do +for table in $( /usr/sbin/nft list tables | grep ' ip ' | cut -f 3 -d ' ' ); do for rule in $(/sbin/iptables-save -c -t ${table}); do # iptables-save has inconsistent output for no sane reason; we grab rematch # strings both before and after the counters, then hamfistedly combine them |