Update of /cvsroot/ipac-ng/ipac-ng/agents/iptables
In directory vz-cvs-4.sog:/tmp/cvs-serv22100/agents/iptables
Modified Files:
iptables.c
Log Message:
Fixed incompatibility with iptables 1.4.11-1.4.12.1 and probably later
Index: iptables.c
===================================================================
RCS file: /cvsroot/ipac-ng/ipac-ng/agents/iptables/iptables.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- iptables.c 6 Sep 2010 21:57:35 -0000 1.9
+++ iptables.c 25 Sep 2011 23:12:24 -0000 1.10
@@ -69,6 +69,10 @@
| FMT_NUMERIC | FMT_NOTABLE)
#define FMT(tab,notab) ((format) & FMT_NOTABLE ? (notab) : (tab))
+#if XTABLES_VERSION_CODE > 5
+#define IPT_ALIGN XT_ALIGN
+#endif
+
static struct option original_opts[] = {
{.name = "append", .has_arg = 1, .val = 'A'},
{.name = "delete", .has_arg = 1, .val = 'D'},
@@ -985,8 +989,13 @@
strcpy(m->m->u.user.name, m->name);
if (m->init != NULL)
m->init(m->m);
+#if XTABLES_VERSION_CODE > 5
+ opts = xtables_merge_options(iptables_globals.orig_opts,
+ opts, m->extra_opts, &m->option_offset);
+#else
opts = xtables_merge_options(opts, m->extra_opts,
&m->option_offset);
+#endif
break;
case 1:
if (optarg[0] == '!' && optarg[1] == '\0') {
|