Merge remote branch 'origin/master'

This commit is contained in:
Jan Engelhardt
2011-11-04 20:08:04 +01:00
6 changed files with 97 additions and 92 deletions

View File

@@ -12,7 +12,7 @@ in combination with the kernel's Kbuild system.
Supported configurations for this release Supported configurations for this release
========================================= =========================================
* iptables >= 1.4.3 * iptables >= 1.4.5
* kernel-source >= 2.6.29 * kernel-source >= 2.6.29
with prepared build/output directory with prepared build/output directory

View File

@@ -22,7 +22,7 @@ fi
AC_CHECK_HEADERS([linux/netfilter/x_tables.h], [], AC_CHECK_HEADERS([linux/netfilter/x_tables.h], [],
[AC_MSG_ERROR([You need to have linux/netfilter/x_tables.h, see INSTALL file for details])]) [AC_MSG_ERROR([You need to have linux/netfilter/x_tables.h, see INSTALL file for details])])
PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.3]) PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.5])
xtlibdir="$(pkg-config --variable=xtlibdir xtables)" xtlibdir="$(pkg-config --variable=xtlibdir xtables)"
PKG_CHECK_MODULES([libmnl], [libmnl >= 1], [:], [:]) PKG_CHECK_MODULES([libmnl], [libmnl >= 1], [:], [:])

View File

@@ -2,6 +2,8 @@
HEAD HEAD
==== ====
Fixes: Fixes:
- build: the code actually requires at least iptables 1.4.5 (would yield a
compile error otherwise), make sure configure checks for it; update INSTALL
- xt_ECHO: fix kernel warning about RTAX_HOPLIMIT being used - xt_ECHO: fix kernel warning about RTAX_HOPLIMIT being used
Changes: Changes:
- xt_ECHO: now calculates UDP checksum - xt_ECHO: now calculates UDP checksum

View File

@@ -151,38 +151,39 @@ rawdnat_tg6_save(const void *entry, const struct xt_entry_target *target)
info->mask); info->mask);
} }
static struct xtables_target rawdnat_tg4_reg = { static struct xtables_target rawdnat_tg_reg[] = {
.version = XTABLES_VERSION, {
.name = "RAWDNAT", .version = XTABLES_VERSION,
.revision = 0, .name = "RAWDNAT",
.family = NFPROTO_IPV4, .revision = 0,
.size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .family = NFPROTO_IPV4,
.userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.help = rawdnat_tg_help, .userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.parse = rawdnat_tg4_parse, .help = rawdnat_tg_help,
.final_check = rawdnat_tg_check, .parse = rawdnat_tg4_parse,
.print = rawdnat_tg4_print, .final_check = rawdnat_tg_check,
.save = rawdnat_tg4_save, .print = rawdnat_tg4_print,
.extra_opts = rawdnat_tg_opts, .save = rawdnat_tg4_save,
}; .extra_opts = rawdnat_tg_opts,
},
static struct xtables_target rawdnat_tg6_reg = { {
.version = XTABLES_VERSION, .version = XTABLES_VERSION,
.name = "RAWDNAT", .name = "RAWDNAT",
.revision = 0, .revision = 0,
.family = NFPROTO_IPV6, .family = NFPROTO_IPV6,
.size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.help = rawdnat_tg_help, .help = rawdnat_tg_help,
.parse = rawdnat_tg6_parse, .parse = rawdnat_tg6_parse,
.final_check = rawdnat_tg_check, .final_check = rawdnat_tg_check,
.print = rawdnat_tg6_print, .print = rawdnat_tg6_print,
.save = rawdnat_tg6_save, .save = rawdnat_tg6_save,
.extra_opts = rawdnat_tg_opts, .extra_opts = rawdnat_tg_opts,
},
}; };
static void _init(void) static void _init(void)
{ {
xtables_register_target(&rawdnat_tg4_reg); xtables_register_targets(rawdnat_tg_reg,
xtables_register_target(&rawdnat_tg6_reg); sizeof(rawdnat_tg_reg) / sizeof(*rawdnat_tg_reg));
} }

View File

@@ -151,38 +151,39 @@ rawsnat_tg6_save(const void *entry, const struct xt_entry_target *target)
info->mask); info->mask);
} }
static struct xtables_target rawsnat_tg4_reg = { static struct xtables_target rawsnat_tg_reg[] = {
.version = XTABLES_VERSION, {
.name = "RAWSNAT", .version = XTABLES_VERSION,
.revision = 0, .name = "RAWSNAT",
.family = NFPROTO_IPV4, .revision = 0,
.size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .family = NFPROTO_IPV4,
.userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.help = rawsnat_tg_help, .userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.parse = rawsnat_tg4_parse, .help = rawsnat_tg_help,
.final_check = rawsnat_tg_check, .parse = rawsnat_tg4_parse,
.print = rawsnat_tg4_print, .final_check = rawsnat_tg_check,
.save = rawsnat_tg4_save, .print = rawsnat_tg4_print,
.extra_opts = rawsnat_tg_opts, .save = rawsnat_tg4_save,
}; .extra_opts = rawsnat_tg_opts,
},
static struct xtables_target rawsnat_tg6_reg = { {
.version = XTABLES_VERSION, .version = XTABLES_VERSION,
.name = "RAWSNAT", .name = "RAWSNAT",
.revision = 0, .revision = 0,
.family = NFPROTO_IPV6, .family = NFPROTO_IPV6,
.size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .size = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)), .userspacesize = XT_ALIGN(sizeof(struct xt_rawnat_tginfo)),
.help = rawsnat_tg_help, .help = rawsnat_tg_help,
.parse = rawsnat_tg6_parse, .parse = rawsnat_tg6_parse,
.final_check = rawsnat_tg_check, .final_check = rawsnat_tg_check,
.print = rawsnat_tg6_print, .print = rawsnat_tg6_print,
.save = rawsnat_tg6_save, .save = rawsnat_tg6_save,
.extra_opts = rawsnat_tg_opts, .extra_opts = rawsnat_tg_opts,
},
}; };
static void _init(void) static void _init(void)
{ {
xtables_register_target(&rawsnat_tg4_reg); xtables_register_targets(rawsnat_tg_reg,
xtables_register_target(&rawsnat_tg6_reg); sizeof(rawsnat_tg_reg) / sizeof(*rawsnat_tg_reg));
} }

View File

@@ -135,38 +135,39 @@ static void tee_tg6_save(const void *ip, const struct xt_entry_target *target)
printf(" --gateway %s ", xtables_ip6addr_to_numeric(&info->gw.in6)); printf(" --gateway %s ", xtables_ip6addr_to_numeric(&info->gw.in6));
} }
static struct xtables_target tee_tg_reg = { static struct xtables_target tee_tg_reg[] = {
.name = "TEE", {
.version = XTABLES_VERSION, .name = "TEE",
.revision = 0, .version = XTABLES_VERSION,
.family = NFPROTO_IPV4, .revision = 0,
.size = XT_ALIGN(sizeof(struct xt_tee_tginfo)), .family = NFPROTO_IPV4,
.userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)), .size = XT_ALIGN(sizeof(struct xt_tee_tginfo)),
.help = tee_tg_help, .userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)),
.parse = tee_tg_parse, .help = tee_tg_help,
.final_check = tee_tg_check, .parse = tee_tg_parse,
.print = tee_tg_print, .final_check = tee_tg_check,
.save = tee_tg_save, .print = tee_tg_print,
.extra_opts = tee_tg_opts, .save = tee_tg_save,
}; .extra_opts = tee_tg_opts,
},
static struct xtables_target tee_tg6_reg = { {
.name = "TEE", .name = "TEE",
.version = XTABLES_VERSION, .version = XTABLES_VERSION,
.revision = 0, .revision = 0,
.family = NFPROTO_IPV6, .family = NFPROTO_IPV6,
.size = XT_ALIGN(sizeof(struct xt_tee_tginfo)), .size = XT_ALIGN(sizeof(struct xt_tee_tginfo)),
.userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)), .userspacesize = XT_ALIGN(sizeof(struct xt_tee_tginfo)),
.help = tee_tg_help, .help = tee_tg_help,
.parse = tee_tg6_parse, .parse = tee_tg6_parse,
.final_check = tee_tg_check, .final_check = tee_tg_check,
.print = tee_tg6_print, .print = tee_tg6_print,
.save = tee_tg6_save, .save = tee_tg6_save,
.extra_opts = tee_tg_opts, .extra_opts = tee_tg_opts,
},
}; };
static __attribute__((constructor)) void tee_tg_ldr(void) static __attribute__((constructor)) void tee_tg_ldr(void)
{ {
xtables_register_target(&tee_tg_reg); xtables_register_targets(tee_tg_reg,
xtables_register_target(&tee_tg6_reg); sizeof(tee_tg_reg) / sizeof(*tee_tg_reg));
} }