]> git.ipfire.org Git - thirdparty/iptables.git/commit
iptables: Add file output option to iptables-save
authorOliver Ford <ojford@gmail.com>
Fri, 26 May 2017 12:25:16 +0000 (12:25 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 29 May 2017 12:00:54 +0000 (14:00 +0200)
commit8d994bcf6be09cd0a13d6f22c6e01e98fb130415
tree1521c2444d27f05569d282cc775bce1b4688adc2
parentf8e5ebc5986bffa682ed9e4497e3c19f19bf961e
iptables: Add file output option to iptables-save

Adds an option to output the results of iptables-save,
ip6tables-save, and xtables-save save to a file.
Updates the man page with this new option.

Uses the dup2 call to replace stdout with the specified file.
Error output is unchanged.

This is a feature requested by a Gentoo developer in
Bugzilla #905.

Signed-off-by: Oliver Ford <ojford@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables-save.c
iptables/iptables-save.8.in
iptables/iptables-save.c
iptables/xtables-save.c