]> git.ipfire.org Git - thirdparty/iptables.git/commit
*tables-restore: Enforce correct counters syntax if present
authorPhil Sutter <phil@nwl.cc>
Fri, 21 Jul 2023 17:40:30 +0000 (19:40 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 28 Jul 2023 09:50:59 +0000 (11:50 +0200)
commit4a2b2008fdf4df980433f99a6d8f2003f2005296
treee7d603f7a276e1dd977f3a2c5ddc773c8c6918c2
parenta2532c966659f386781a5757e0a1f42cb1d81573
*tables-restore: Enforce correct counters syntax if present

If '--counters' option was not given, restore parsers would ignore
anything following the policy word. Make them more strict, rejecting
anything in that spot which does not look like counter values even if
not restoring counters.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/iptables-restore.c
iptables/tests/shell/testcases/ipt-restore/0008-restore-counters_0
iptables/xtables-restore.c