summaryrefslogtreecommitdiffstats
path: root/iptables/iptables-apply
Commit message (Collapse)AuthorAgeFilesLines
* iptables-apply: Eliminate shellcheck warningsPhil Sutter2023-08-011-8/+8
| | | | | | | | | | | | | Actual warnings were only about use of '-a' in bracket expressions (replace by '&&' pipeline) and the immediate evaluation of the variable in trap command. The remaining changes silence info-level messages: missing quoting around variables, pointless '$' in arithmetic expressions, backticks instead of $(...), missing '-r' parameter when calling read and an awkward negated '-z' check. Signed-off-by: Phil Sutter <phil@nwl.cc>
* iptables-apply: Drop unused variablePhil Sutter2021-06-071-1/+0
| | | | | | | It was assigned to but never read. Fixes: b45b4e3903414 ("iptables-apply: script and manpage update") Signed-off-by: Phil Sutter <phil@nwl.cc>
* iptables-apply: script and manpage updategw.2010@tnode.com2019-12-051-91/+211
| | | | | | | | | | | | | | | | | | | This is GW's update to iptables-apply. It does a code cleanup and adds two options: one runs a command and the other writes the sucessful rules file. I modified the script to use mktemp instead of tempfile. I also fixed a couple of hyphens in the man page addition. Arturo says: I'm not a strong supporter of this script, but there are many users of it, so better do things right and add this patch that should produce no harm anyway. This patch is forwarded from the iptables Debian package, where it has been around for many years now. Signed-off-by: GW <gw.2010@tnode.com> Signed-off-by: Laurence J. Lane <ljlane@debian.org> Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* iptables-apply: Replace signal numbers by namesPhil Sutter2018-09-241-1/+2
| | | | | | | | As covscan stated: "Trapping signals by number is not well defined. Prefer signal names." Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
* iptables-apply: Quote strings passed to echoPhil Sutter2018-09-241-3/+3
| | | | | | | | Not a real problem here, but covscan got confused by one string containing 'then' keyword. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
* iptables-apply: select default rule file depending on call nameMartin F. Krafft2011-06-301-12/+13
| | | | | | | | | | ip6tables-apply points to iptables-apply (which is good). Since iptables/ip6tables rule files are different, the reporter suggests that the DEFAULT_FILE variable should depend on whether iptables-apply or ip6tables-apply is run. References: http://bugs.debian.org/547734 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* src: move all iptables pieces into a separate directoryJan Engelhardt2011-06-071-0/+174
(Unclutter top-level dir) Signed-off-by: Jan Engelhardt <jengelh@medozas.de>