Skip to contentSkip to conversation

xt_condition

PATCH New Massimiliano Hofer 1 participant 1 message Sep 24, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 xt_condition

From fad7ddb4c6c1daa2b2bbd88756a5f88824ff8bdb Mon Sep 17 00:00:00 2001
From: Massimiliano Hofer <[email protected]>
Date: Mon, 25 Sep 2006 00:38:14 +0200
Subject: [PATCH] xt_condition

This patch implements the condition match.
It needs priv_data.

---
 include/linux/netfilter/xt_condition.h |   11 +
 net/netfilter/Kconfig                  |   10 +
 net/netfilter/Makefile                 |    1 
 net/netfilter/xt_condition.c           |  292 ++++++++++++++++++++++++++++++++
 4 files changed, 314 insertions(+), 0 deletions(-)
include/linux/netfilter/xt_condition.h new file +11 -0
new file mode 100644
index 0000000..f0706d0
@@ -0,0 +1,11 @@
+#ifndef _XT_CONDITION_H
+#define _XT_CONDITION_H
+
+#define CONDITION_NAME_LEN  32
+
+struct condition_info {
+	char name[CONDITION_NAME_LEN];
+	int  invert;
+};
+
+#endif /* _XT_CONDITION_H */
net/netfilter/Kconfig +10 -0
index 0a28d2c..4b6c9fc 100644
@@ -228,6 +228,16 @@ config NETFILTER_XT_MATCH_COMMENT
 	  If you want to compile it as a module, say M here and read
 	  <file:Documentation/modules.txt>.  If unsure, say `N'.
 
+config NETFILTER_XT_MATCH_CONDITION
+        tristate  '"condition" match support'
+        depends on NETFILTER_XTABLES && PROC_FS
+        help
+          This option allows you to match firewall rules against condition
+          variables stored in the /proc/net/nf_condition directory.
+
+          If you want to compile it as a module, say M here and read
+          Documentation/modules.txt.  If unsure, say `N'.
+
 config NETFILTER_XT_MATCH_CONNBYTES
 	tristate  '"connbytes" per-connection counter match support'
 	depends on NETFILTER_XTABLES
net/netfilter/Makefile +1 -0
index a74be49..1cbd4ac 100644
@@ -56,3 +56,4 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTI
 obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o
+obj-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += xt_condition.o
net/netfilter/xt_condition.c new file +292 -0

292 lines not on this page · raw message

Signature · 1 line
1.4.2