Skip to contentSkip to conversation

: bridge-netfilter: remove deferred hooks

NETFILTER Applied Patrick McHardy 2 participants 2 messages Dec 13, 2006 – Dec 14, 2006

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

This patch removes the bridge netfilter deferred hooks, a bit earlier than scheduled, but in January we'll probably already be to late in the release cycle for 2.6.20.

Tested in a purely bridged setup with VLAN and ethernet, brouter+DNAT setup is untested but should work fine.

Please apply, thanks.

[NETFILTER]: bridge-netfilter: remove deferred hooks

Remove the deferred hooks and all related code as scheduled in feature-removal-schedule.

---
commit 68df071a201f06b08cdc07111c6d4af918e64edd
tree c5374b8335712fc3e5eed4513f05b632101c6df3
parent 55cf35800329b56edc1f8f41214942e39de5bef9
author Patrick McHardy <[email protected]> Wed, 13 Dec 2006 06:12:22 +0100 committer Patrick McHardy <[email protected]> Wed, 13 Dec 2006 06:12:22 +0100

 Documentation/feature-removal-schedule.txt |   16 --
 include/linux/netfilter_bridge.h           |    1 
 include/linux/netfilter_ipv4.h             |    2 
 include/linux/netfilter_ipv6.h             |    2 
 net/bridge/br_netfilter.c                  |  188 ++--------------------------
 net/netfilter/xt_physdev.c                 |   12 +-
 6 files changed, 20 insertions(+), 201 deletions(-)
Documentation/feature-removal-schedule.txt +0 -16
index 46f2a55..654d42c 100644
@@ -227,22 +227,6 @@ Who:	Jean Delvare <[email protected]>
 
 ---------------------------
 
-What:	Bridge netfilter deferred IPv4/IPv6 output hook calling
-When:	January 2007
-Why:	The deferred output hooks are a layering violation causing unusual
-	and broken behaviour on bridge devices. Examples of things they
-	break include QoS classifation using the MARK or CLASSIFY targets,
-	the IPsec policy match and connection tracking with VLANs on a
-	bridge. Their only use is to enable bridge output port filtering
-	within iptables with the physdev match, which can also be done by
-	combining iptables and ebtables using netfilter marks. Until it
-	will get removed the hook deferral is disabled by default and is
-	only enabled when needed.
-
-Who:	Patrick McHardy <[email protected]>
-
----------------------------
-
 What:	PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
 When:	October 2008
 Why:	The stacking of class devices makes these values misleading and
include/linux/netfilter_bridge.h +0 -1
index 6c4613f..55689f3 100644
@@ -68,7 +68,6 @@ struct bridge_skb_cb {
 	} daddr;
 };
 
-extern int brnf_deferred_hooks;
 #else
 #define nf_bridge_maybe_copy_header(skb)	(0)
 #define nf_bridge_pad(skb)			(0)
include/linux/netfilter_ipv4.h +0 -2
index 5821eb5..ceae87a 100644
@@ -57,10 +57,8 @@ enum nf_ip_hook_priorities {
 	NF_IP_PRI_RAW = -300,
 	NF_IP_PRI_SELINUX_FIRST = -225,
 	NF_IP_PRI_CONNTRACK = -200,
-	NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
 	NF_IP_PRI_MANGLE = -150,
 	NF_IP_PRI_NAT_DST = -100,
-	NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
 	NF_IP_PRI_FILTER = 0,
 	NF_IP_PRI_NAT_SRC = 100,
 	NF_IP_PRI_SELINUX_LAST = 225,
include/linux/netfilter_ipv6.h +0 -2
index ab81a6d..66ca8e3 100644
@@ -62,10 +62,8 @@ enum nf_ip6_hook_priorities {
 	NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
 	NF_IP6_PRI_SELINUX_FIRST = -225,
 	NF_IP6_PRI_CONNTRACK = -200,
-	NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
 	NF_IP6_PRI_MANGLE = -150,
 	NF_IP6_PRI_NAT_DST = -100,
-	NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
 	NF_IP6_PRI_FILTER = 0,
 	NF_IP6_PRI_NAT_SRC = 100,
 	NF_IP6_PRI_SELINUX_LAST = 225,
net/bridge/br_netfilter.c +16 -172

240 lines not on this page · raw message

net/netfilter/xt_physdev.c +4 -8
index fd8f954..b9b3ffc 100644
@@ -113,20 +113,16 @@ checkentry(const char *tablename,
 	if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
 	    info->bitmask & ~XT_PHYSDEV_OP_MASK)
 		return 0;
-	if (brnf_deferred_hooks == 0 &&
-	    info->bitmask & XT_PHYSDEV_OP_OUT &&
+	if (info->bitmask & XT_PHYSDEV_OP_OUT &&
 	    (!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
 	     info->invert & XT_PHYSDEV_OP_BRIDGED) &&
 	    hook_mask & ((1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) |
 	                 (1 << NF_IP_POST_ROUTING))) {
 		printk(KERN_WARNING "physdev match: using --physdev-out in the "
 		       "OUTPUT, FORWARD and POSTROUTING chains for non-bridged "
-		       "traffic is deprecated and breaks other things, it will "
-		       "be removed in January 2007. See Documentation/"
-		       "feature-removal-schedule.txt for details. This doesn't "
-		       "affect you in case you're using it for purely bridged "
-		       "traffic.\n");
-		brnf_deferred_hooks = 1;
+		       "traffic is not supported anymore.\n");
+		if (hook_mask & (1 << NF_IP_LOCAL_OUT))
+			return 0;
 	}
 	return 1;
 }
maintainer Applied
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Wed, 13 Dec 2006 06:21:01 +0100

Quoted 8 lines

This patch removes the bridge netfilter deferred hooks, a bit earlier than scheduled, but in January we'll probably already be to late in the release cycle for 2.6.20.

Tested in a purely bridged setup with VLAN and ethernet, brouter+DNAT setup is untested but should work fine.

Please apply, thanks.

Applied, thanks Patrick.