]> git.ipfire.org Git - thirdparty/iptables.git/commit
iptables: fix broken options-merging during libxtables rework
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2009 16:46:17 +0000 (17:46 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2009 16:46:17 +0000 (17:46 +0100)
commitf503cb8ad6360ca646e985f02c2eb0c4bfe8a2c8
treec014bc1ca33bb6f17783789ff620571cbe3d9d32
parent409f2a8e3b2706c8c6c5e345a4bc77fca8ad7105
iptables: fix broken options-merging during libxtables rework

This patch fixes options-merging that was broken somewhere
during the libxtables rework. Before this patch, two pointers
were used to keep the current options, however, the options field
in xt_params was not appropritely updated. Thus, xtables_free_opts()
was not restoring the original options.

This patch fixes iptables-restore and ip6tables-restore that
stopped working in my personal firewall.

% iptables-restore
*filter
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables-restore v1.4.3-rc1: Unknown arg `ESTABLISHED,RELATED'
Error occurred at line: 4
Try `iptables-restore -h' or 'iptables-restore --help' for more information.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
ip6tables.c
iptables.c