Skip to contentSkip to conversation

: realm match

PATCH In review Harald Welte 1 participant 1 message Jun 21, 2004

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

PATCH 13/14 : realm match

This patch for 2.6 adds the realm match.

Author: Sampsa Ranta <[email protected]>

--
- Harald Welte <[email protected]> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/06/20 22:48:47+02:00 [email protected]
# [NETFILTER]: Add realm match
#

# net/ipv4/netfilter/ipt_realm.c
#   2004/06/20 22:48:37+02:00 [email protected] +76 -0
# 
# include/linux/netfilter_ipv4/ipt_realm.h
#   2004/06/20 22:48:37+02:00 [email protected] +10 -0
# 
# net/sched/Kconfig
#   2004/06/20 22:48:37+02:00 [email protected] +2 -2
#   [NETFILTER]: Add realm match
# 
# net/ipv4/netfilter/ipt_realm.c
#   2004/06/20 22:48:37+02:00 [email protected] +0 -0
#   BitKeeper file /home/kaber/src/nf/pending/linux-2.6/net/ipv4/netfilter/ipt_realm.c
# 
# net/ipv4/netfilter/Makefile
#   2004/06/20 22:48:37+02:00 [email protected] +1 -0
#   [NETFILTER]: Add realm match
# 
# net/ipv4/netfilter/Kconfig
#   2004/06/20 22:48:37+02:00 [email protected] +14 -0
#   [NETFILTER]: Add realm match
# 
# include/linux/netfilter_ipv4/ipt_realm.h
#   2004/06/20 22:48:37+02:00 [email protected] +0 -0
#   BitKeeper file /home/kaber/src/nf/pending/linux-2.6/include/linux/netfilter_ipv4/ipt_realm.h
# 
diff -Nru a/include/linux/netfilter_ipv4/ipt_realm.h b/include/linux/netfilter_ipv4/ipt_realm.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/netfilter_ipv4/ipt_realm.h	2004-06-20 23:01:23 +02:00
@@ -0,0 +1,10 @@
+#ifndef _IPT_REALM_H
+#define _IPT_REALM_H
+
+struct ipt_realm_info {
+	u_int32_t id;
+	u_int32_t mask;
+	u_int8_t invert;
+};
+
+#endif /* _IPT_REALM_H */
diff -Nru a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
--- a/net/ipv4/netfilter/Kconfig	2004-06-20 23:01:23 +02:00
+++ b/net/ipv4/netfilter/Kconfig	2004-06-20 23:01:23 +02:00
@@ -613,5 +613,19 @@
 	  If you want to compile it as a module, say M here and read
 	  Documentation/modules.txt.  If unsure, say `N'.

+config IP_NF_MATCH_REALM
+ tristate 'realm match support'
+ depends on IP_NF_IPTABLES
+ select NET_CLS_ROUTE
+ help
+ This option adds a `realm' match, which allows you to use the realm
+ key from the routing subsytem inside iptables.
+
+ This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option
+ in tc world.
+
+ If you want to compile it as a module, say M here and read
+ Documentation/modules.txt. If unsure, say `N'.
+
endmenu

net/ipv4/netfilter/Makefile +1 -0
diff -Nru a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
@@ -64,6 +64,7 @@
 obj-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state.o
 obj-$(CONFIG_IP_NF_MATCH_CONNTRACK) += ipt_conntrack.o
 obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss.o
+obj-$(CONFIG_IP_NF_MATCH_REALM) += ipt_realm.o
 obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
 
 obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
net/ipv4/netfilter/ipt_realm.c new file +76 -0

76 lines not on this page · raw message

net/sched/Kconfig +2 -2
diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig
@@ -242,6 +242,7 @@
 config NET_CLS_ROUTE4
 	tristate "Routing table based classifier"
 	depends on NET_CLS
+	select NET_CLS_ROUTE
 	help
 	  If you say Y here, you will be able to classify outgoing packets
 	  according to the route table entry they matched. If unsure, say Y.
@@ -251,8 +252,7 @@
 
 config NET_CLS_ROUTE
 	bool
-	depends on NET_CLS_ROUTE4
-	default y
+	default n
 
 config NET_CLS_FW
 	tristate "Firewall based classifier"