From: Patrick McHardy Date: Tue, 12 Apr 2011 14:05:39 +0000 (+0200) Subject: Merge branch 'opts' of git://dev.medozas.de/iptables X-Git-Tag: v1.4.11~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd50f26ad6016ae57af1f822f8aa3ceb2ef9727a;p=thirdparty%2Fiptables.git Merge branch 'opts' of git://dev.medozas.de/iptables --- cd50f26ad6016ae57af1f822f8aa3ceb2ef9727a diff --cc iptables.c index cf272278,2c1528ea..0441dce3 --- a/iptables.c +++ b/iptables.c @@@ -1398,16 -1416,20 +1410,20 @@@ static void command_match(struct iptabl m->m->u.user.revision = m->revision; if (m->init != NULL) m->init(m->m); - if (m != m->next) { - /* Merge options for non-cloned matches */ + if (m == m->next) + return; + /* Merge options for non-cloned matches */ + if (m->x6_options != NULL) + opts = xtables_options_xfrm(iptables_globals.orig_opts, opts, + m->x6_options, &m->option_offset); + else if (m->extra_opts != NULL) opts = xtables_merge_options(iptables_globals.orig_opts, opts, m->extra_opts, &m->option_offset); - if (opts == NULL) - xtables_error(OTHER_PROBLEM, "can't alloc memory!"); - } + if (opts == NULL) + xtables_error(OTHER_PROBLEM, "can't alloc memory!"); } -int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle) +int do_command4(int argc, char *argv[], char **table, struct iptc_handle **handle) { struct iptables_command_state cs; struct ipt_entry *e = NULL;