]> git.ipfire.org Git - ipfire-2.x.git/commit
misc-progs: getipstat: Refactor + extend
authorRobin Roevens <robin.roevens@disroot.org>
Tue, 27 Apr 2021 20:07:32 +0000 (22:07 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 May 2021 14:27:27 +0000 (14:27 +0000)
commit8b68ed1226c6dd9b352bb157a6a1c5ce7cb7ef82
tree4ab0760d872e468ad85f02849c58494c5b8b43aa
parentd8bf30563f08007edf8492b1fc55a9c46004014f
misc-progs: getipstat: Refactor + extend

* Return output of iptables directly instead of writing it to files.
 * Make iptables wait for 5s if xtables is locked by another iptables
 process. (--wait 5 argument)
 * Add optional parameter "-x" to have iptables report exact numbers.
 * Add optional parameter "-f" to display  the filter table  (default).
 * Add optional parameter "-n" to display the nat table.
 * Add optional parameter "-m" to display the mangle table.
  * Adapt iptables.cgi and guardian.cgi to catch getipstat output
  instead of reading temp-files.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/guardian.cgi
html/cgi-bin/iptables.cgi
src/misc-progs/getipstat.c