summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/Makefile4
-rw-r--r--extensions/libxt_helper.c (renamed from extensions/libipt_helper.c)33
-rw-r--r--include/linux/netfilter/xt_helper.h8
-rw-r--r--include/linux/netfilter_ipv4/ipt_helper.h8
4 files changed, 34 insertions, 19 deletions
diff --git a/extensions/Makefile b/extensions/Makefile
index 5830faa8..63efc2af 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -5,9 +5,9 @@
# header files are present in the include/linux directory of this iptables
# package (HW)
#
-PF_EXT_SLIB:=ah addrtype conntrack ecn helper icmp iprange owner policy realm tos ttl unclean DNAT ECN LOG MASQUERADE MIRROR NETMAP REDIRECT REJECT SAME SNAT TOS TTL ULOG
+PF_EXT_SLIB:=ah addrtype conntrack ecn icmp iprange owner policy realm tos ttl unclean DNAT ECN LOG MASQUERADE MIRROR NETMAP REDIRECT REJECT SAME SNAT TOS TTL ULOG
PF6_EXT_SLIB:=eui64 hl icmp6 owner policy HL LOG
-PFX_EXT_SLIB:=connmark connlimit comment dscp esp hashlimit length limit mac mark multiport physdev pkttype sctp state standard tcp tcpmss udp CLASSIFY CONNMARK DSCP MARK NFQUEUE NOTRACK TCPMSS TRACE
+PFX_EXT_SLIB:=connmark connlimit comment dscp esp hashlimit helper length limit mac mark multiport physdev pkttype sctp state standard tcp tcpmss udp CLASSIFY CONNMARK DSCP MARK NFQUEUE NOTRACK TCPMSS TRACE
ifeq ($(DO_SELINUX), 1)
PF_EXT_SE_SLIB:=
diff --git a/extensions/libipt_helper.c b/extensions/libxt_helper.c
index c862541d..ca3cb21f 100644
--- a/extensions/libipt_helper.c
+++ b/extensions/libxt_helper.c
@@ -5,8 +5,8 @@
#include <stdlib.h>
#include <getopt.h>
-#include <iptables.h>
-#include <linux/netfilter_ipv4/ipt_helper.h>
+#include <xtables.h>
+#include <linux/netfilter/xt_helper.h>
/* Function which prints out usage message. */
static void
@@ -32,7 +32,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
unsigned int *nfcache,
struct xt_entry_match **match)
{
- struct ipt_helper_info *info = (struct ipt_helper_info *)(*match)->data;
+ struct xt_helper_info *info = (struct xt_helper_info *)(*match)->data;
switch (c) {
case '1':
@@ -68,7 +68,7 @@ print(const void *ip,
const struct xt_entry_match *match,
int numeric)
{
- struct ipt_helper_info *info = (struct ipt_helper_info *)match->data;
+ struct xt_helper_info *info = (struct xt_helper_info *)match->data;
printf("helper match %s\"%s\" ", info->invert ? "! " : "", info->name);
}
@@ -77,24 +77,39 @@ print(const void *ip,
static void
save(const void *ip, const struct xt_entry_match *match)
{
- struct ipt_helper_info *info = (struct ipt_helper_info *)match->data;
+ struct xt_helper_info *info = (struct xt_helper_info *)match->data;
printf("%s--helper \"%s\" ",info->invert ? "! " : "", info->name);
}
-static struct iptables_match helper = {
+static struct xtables_match helper = {
+ .family = AF_INET,
.name = "helper",
.version = IPTABLES_VERSION,
- .size = IPT_ALIGN(sizeof(struct ipt_helper_info)),
+ .size = XT_ALIGN(sizeof(struct xt_helper_info)),
.help = &help,
.parse = &parse,
.final_check = &final_check,
.print = &print,
.save = &save,
- .extra_opts = opts
+ .extra_opts = opts,
+};
+
+static struct xtables_match helper6 = {
+ .family = AF_INET6,
+ .name = "helper",
+ .version = IPTABLES_VERSION,
+ .size = XT_ALIGN(sizeof(struct xt_helper_info)),
+ .help = &help,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void _init(void)
{
- register_match(&helper);
+ xtables_register_match(&helper);
+ xtables_register_match(&helper6);
}
diff --git a/include/linux/netfilter/xt_helper.h b/include/linux/netfilter/xt_helper.h
new file mode 100644
index 00000000..6b42763f
--- /dev/null
+++ b/include/linux/netfilter/xt_helper.h
@@ -0,0 +1,8 @@
+#ifndef _XT_HELPER_H
+#define _XT_HELPER_H
+
+struct xt_helper_info {
+ int invert;
+ char name[30];
+};
+#endif /* _XT_HELPER_H */
diff --git a/include/linux/netfilter_ipv4/ipt_helper.h b/include/linux/netfilter_ipv4/ipt_helper.h
deleted file mode 100644
index 6f12ecb8..00000000
--- a/include/linux/netfilter_ipv4/ipt_helper.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _IPT_HELPER_H
-#define _IPT_HELPER_H
-
-struct ipt_helper_info {
- int invert;
- char name[30];
-};
-#endif /* _IPT_HELPER_H */